Configuring the Mapfile

From ARK
Revision as of 16:32, 14 November 2008 by Stuarteve (talk | contribs) (Header)

Jump to: navigation, search

Initial Setup

You need to ensure that Mapserver is setup to server as a WMS/WFS server. If you are not sure, please visit WMS Server HowTo and WFS Server HowTo.

The mapfiles themselves need to be setup manually per Mapserver setup - ARK will not write these for you unfortunately, so its worth undertaking the mapfile setup alongside the official mapfile documentation.

Example Mapfile

ARK uses two different mapfiles, the ark_wfs.map and ark_wms.php. These are found within the ark directory structure in mapserver/mapfiles/.

The files themselves should be reasonably self-explanatory if you have used Mapserver before.

Header

 MAP
   NAME "ARK WMS Map"
   IMAGETYPE      PNG24
   EXTENT 533866 180940 533963 181000
   SIZE           600 400
   SHAPEPATH      "C:/ms4w/Apache/htdocs/tutorial_ark/data/mapping/"
   IMAGECOLOR     250 250 250
   FONTSET        "C:/ms4w/Apache/htdocs/tutorial_ark/mapserver/fonts/fonts.list"
   SYMBOLSET      "C:/ms4w/Apache/htdocs/tutorial_ark/mapserver/symbols/symbols35.sym"
   DEBUG ON
   WEB
     METADATA
     "wms_name"			"ARK WMS"
     "wms_title"			"ARK WMS"
     "wms_onlineresource"	"http://www.lparchaeology.com/prescot/ark/php/map/ark_wxs_server.php" 
     "wms_srs"			"EPSG:27700"
     "wms_feature_info_mime_type" "text/html"
     "wms_server_version" "1.1.1"
     END
     IMAGEPATH 'C:/ms4w/Apache/htdocs/tutorial_ark/mapserver/tmp/'
     IMAGEURL '/mapserver/tmp/'
     MAXSCALE 20000000
     MINSCALE 500
     LOG '/srv/www/htdocs/fasti/mapserver/mapfiles/ms_log.txt'
  END
  OUTPUTFORMAT
     NAME "png"
     MIMETYPE "image/png"
     DRIVER "GD/PNG"
     EXTENSION "png"
     IMAGEMODE "RGB"
  END
  PROJECTION
  #  Basic initial projection should be in ETRS89 / ETRS-LCC
  #  This projection will also be dynamically set by the PHP
      "init=epsg:27700"
  #
  END
  #