MapServer is an open source package to create internet-based mapping applications. It is popular with developers who wish to create their own geospatial servers instead of depending on third party servers such as Google Maps or Microsoft Virtual Earth.
Originally developed by the University of Minnesota with the assistance of NASA, MapServer is currently managed by the Open Open Source Geospatial Foundation (OSGeo). This was established to include MapServer and related open source GIS projects. MapServer continues to be often referred to as "UMN MapServer" to distinguish it from commercial "map server" products.
MapServer can work with both raster data and vector data. In the most basic configuration, MapServer creates a raster image which is embedded in a HTML file. This tends to be cumbersome to use, so it is more usual to use MapServer through one of the MapScript programming interfaces. The most efficient way to use MapServer is to use it as a WMS server, serving tiles to client software (eg. OpenLayers) in an AJAX fashion.
MapServer supports the concept of layers. Each layer is defined using a map file. This is a text file that includes configuration information for the layer. For example, here is the map file for the ASTER (satellite image) raster layer for the EcoMap Costa Rica project:
ERROR [include_code_listing plugin]: File Not Found (/usr/www/users/winwaed/geowebguru/img/2009/sample_raster.map)
This is configured to produce WMS tiles. The image source and projection (EPSG:4326) are provided. Most of the other settings (eg. the font file) are defaults that are not required in this example. The image is defined in a TIFF raster. It is not apparent from the map file, but the TIFF image has been tiled and includes a tile index for efficiency.
Here is a more sophisticated example that provides the "synthetic stream" (theoretical river positions) data for the EcoMap Costa Rica maps:
ERROR [include_code_listing plugin]: File Not Found (/usr/www/users/winwaed/geowebguru/img/2008/openlayers_ve_streams.map)
This example plots a shape file of lines. This file is defined in native ESRI SHP format. The file consists of two sub-layers, defined by LAYER objects. These plot the same data, but set the line thickness according to the scale level.
Here is an example screenshot of the final application, showing the ASTER imagery around Arenal Volcano and La Fortuna in Costa Rica:
The scale bar and other controls are provided by Open Layers. Other layers such as field data have been switched off for clarity.
MapServer also supports feature queries, with the results being returned in the image layer or as a text list. Queries can be according to attributes and/or geography.
MapServer can be downloaded from the main MapServer website at http://mapserver.org. This site also includes documentation, FAQs, and other resources.
MapServer was chosen for http://www.ecomapcostarica.com because services such as Google Maps and Microsoft Virtual Earth had very poor map coverage of rural Costa Rica. A developer may also choose to use MapServer if they do not want to be tied to the whims of a third party system; or for commercial reasons (both Google and Microsoft charge for most commercial implementations). Finally, the appearance of a MapServer map can be readily changed. This is difficult or impossible with a third party service.