Presentation slides for the "Getting Started with MapServer" workshop can be downloaded at http://biometry.gis.umn.edu/~pnaciona/GettingStartedWithMapServer.odp (OpenOffice 2.0 Presentation Document) or at http://biometry.gis.umn.edu/~pnaciona/GettingStartedWithMapServer.pdf (PDF File).
If you are using the LiveDVD distributed at the workshop, you can run OpenOffice.org Impress to view the presentation. Impress can be run from the command line by typing: "/opt/openoffice.org/program/simpress". You can also open the PDF version of this presentation if OpenOffice is not an option for you.
A working demo for this workshop can be accessed at http://biometry.gis.umn.edu/ms101/.
This directory contains examples and demo application for "Getting Started with MapServer" workshop. The directory structure looks like this: ms101/
|-data/ |-fonts/ |-graphics/ |-symbols/ |-webdocs/
The root directory (ms101) contains all the READMEs, the example MapServer map and template files, the demo map and template files, and Apache configuration snippet files to create an Apache Alias for the demo. Each of the example files accompany a presentation (GettingStartedWithMapServer.odp, GettingStartedWithMapServer.pdf)--you will need to follow the presentation for the examples files to make sense. The demo files are used by the demo application.
The "data" subdirectory contains the data used in this workshop. Please read the file README_DATA for more information.
The "fonts" subdirectory contain the BitStream Vera font collection. It also contains a MapServer fonts list, "fontlist.txt". This font list is a mapping of the font names used by MapServer to the actual font filenames.
The "graphics" subdirectory contains the example images used in the presentation slides.
The "symbol" subdirectory contains a symbols definition text file, "symbols.txt". There are also some graphics included in this subdirectory useful for creating road labels (although it isn't used in this workshop).
The "webdocs" subdirectory contains all web documents that can be read directly through the Web. This includes the HTML index page for the demo application and the reference map used by the demo application. This is the directory that will need to be exposed to the Web. While you can make all the subdirectories available on the web, there are reasons not to do so: 1. Security--web application can be insecure and you want to minimize that potential. Your mapfiles contains system (local) paths that you might not want others to see. 2. You or your organization might also not want the public to have direct access to your GIS data.
The workshop data can be downloaded through the Data page.
Boot your computer using the LiveDVD disc that was handed out at the workshop. All the workshop materials are installed and located in /data/www/ms101. To open the accompanying OpenOffice.org 2.0 Impress presentation slides, you can invoke Impress from the command line: /opt/openoffice.org2.0/program/simpress.
You can also point your browser to http://localhost/ms101/ and run the examples from there. To view/edit the map and HTML template files, you can use "kate" or your favorite command line text editor. All the map and template files are in /data/www/ms101 while the index.html page is under the "webdocs" subdirectory.
If installing on your hard drive, you must have MapServer installed. You can get standalone MapServer/Apache packages from MapTools.org for Linux (FGS Linux Installer) and Windows (MS4W). For Mac OS X, you can get it from http://www.kyngchaos.com/software/unixport.)
Copy the "ms101" directory tree to any directory where you have read, write, and execute access. In my machine it is located under /data/www. Yours can be different.
To make the example demo application work, you will need to define an Apache Alias to the webdocs subdirectory. An Apache configuration snippet can be found in the file "httpd_ms101.conf"--you can copy the content of this file to Apache's httpd.conf or you can "include" the file in your httpd.conf. If you don't want to keep opening the httpd.conf file, you can append the following line once: Include /data/www/ms101/httpd_ms101.conf
You will also need to define a temporary directory where MapServer can dump any file it creates. This means the web user (usually "nobody" or "apache") must have read and write access to this directory. A configuration snippet for this temporary directory can be found in the file "httpd_ms_tmp.conf". Again, you can copy it to httpd.conf or use the Include directive: Include /data/www/ms101/httpd_ms_tmp.conf
The paths I provided are correct on my machine, you might have to edit it on yours. You will have to restart the Apache service/daemon before you can access the demo application.
To access the demo, open the URL "http://localhost/ms101/" on your browser. This will get you going.
GRASS DATA EXAMPLE
The mapfile "ms101_grass6.map" provides an example on how to use GRASS vector and raster data in MapServer. To use it your version of GDAL library must support GRASS datasets. Included in this workshop is the gdal-grass plugin intended to be used with the LiveCD. To install the plugin, untar the tarball "gdal-grass-1.3.1_bin.tar.gz and move the "gdalplugins" directory to "/usr/lib": tar xzvf gdal-grass-1.3.1_bin.tar.gz sudo cp gdalplugins /usr/lib/
You may then access the example by replacing the "ms101.map" mapfile with "ms101_grass6.map".
When using GRASS datasets with MapServer you are required to copy the file .grassrc6 (usually in your home directory) to the web accessible directory of your application. In this workshop our web accessible directory is "/data/www/ms101/webdocs". Go ahead and check it out, if you like.
CHANGES IN EPSG Definitions
The definition of EPSG:2163 in Proj.4's epsg file is not correct and will need to be replaced if you want the maps to line up. Open the file "/usr/share/proj/epsg" and find replace the line that starts with "<2163>" with these:
#<2163> +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs <>
<2163> +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +datum=NAD83 +ellps=GRS80 +units=m +no_defs <>
Save the changes and your maps should now line up.
Created by Perry Nacionales for "Getting Started with MapServer" workshop. Last update:2006-07-21