# MapServer/GRASS: # this file contains the map definitions # This program is Free Software under the GNU GPL (>=2). # Markus Neteler 2001 # You need: # # o .grassrc5 stored in $DOCUMENT_ROOT # (e.g. /usr/local/httpd/htdocs/ ), # which may be the HOME of the apache user, # containing the entries: # GISDBASE: /usr/local/share/grassdata # LOCATION_NAME: spearfish # MAPSET: PERMANENT # # o a tmp directory: /tmp/mapserver (with Apache Alias) # o a start file with this URL to the cgi-bin inside: # http://localhost/cgi-bin/mapserv?map=\ # /usr/local/httpd/map-script/mapserver.map # o the spearfish.html defining the map/html template # o this mapserver.map containing the map definitions NAME GRASS STATUS ON SIZE 500 400 #Spearfish # W S E N EXTENT 590000 4914000 609000 4928000 UNITS METERS # Start of web interface definition WEB # reference HTML file: TEMPLATE /usr/local/httpd/htdocs/spearfish.html #temp data absolute path: IMAGEPATH /tmp/mapserver/ #temp data relative path: IMAGEURL "/tmp/" # max/min zoom: MINSCALE 1500 MAXSCALE 155000 END # Web # the small reference map, should get a red zoom box REFERENCE STATUS ON IMAGE "/usr/local/httpd/htdocs/spearfish/refmap.png" SIZE 187 150 EXTENT 590000 4914000 609000 4928000 COLOR 200 200 200 OUTLINECOLOR 255 0 0 END # Start of scalebar SCALEBAR IMAGECOLOR 255 225 204 LABEL COLOR 0 0 0 SIZE tiny END STYLE 0 SIZE 100 3 COLOR 255 0 0 OUTLINECOLOR 0 0 0 UNITS KILOMETERS INTERVALS 3 STATUS ON END # Start of legend LEGEND KEYSIZE 18 12 IMAGECOLOR 255 225 204 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 87 END STATUS ON END # maps, order determines display order: first here is below, following on top #raster layer available in GeoTIFF (8bit recommened): # r.out.tiff -t in=elevation.dem out=elevation # convert -colors 256 elevation.tif elevation2.tif # mv elevation2.tif elevation.tif LAYER NAME dem TYPE RASTER STATUS ON OFFSITE 0 #switch off map at certain min scale (1:1000): MINSCALE 1000 DATA /usr/local/httpd/htdocs/spearfish/elevation.tif END #GRASS raster map directly from location (8bit only): LAYER NAME soils TYPE RASTER STATUS ON DATA "/usr/local/share/grassdata/spearfish/\ PERMANENT/cellhd/soils" END # Layer #vector layer in SHAPE: #v.out.shape map=roads type=line pref=roads cats=string LAYER NAME roads TYPE LINE STATUS DEFAULT DATA /usr/local/httpd/htdocs/spearfish/roads TOLERANCE 5 LABELITEM CAT_ID TEMPLATE /usr/local/httpd/htdocs/spearfish/roads.html OFFSITE 0 CLASS NAME "Road" COLOR 80 80 80 LABEL POSITION CC SIZE SMALL COLOR 0 0 225 END END END END # Map File