Live GIS Disc:mapfile for mapserver

From OSGeo
Revision as of 11:24, 23 September 2008 by Wiki-Ominiverdi (talk | contribs) (New page: to respect the liveDVD configuration this mapfile should be put as: /home/demo/mapserver/test.map <code> # (Created with PyQgis MapServer Export plugin) MAP NAME test map # Map ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

to respect the liveDVD configuration this mapfile should be put as:

/home/demo/mapserver/test.map


# (Created with PyQgis MapServer Export plugin)
MAP
  NAME test map
  # Map image size
  SIZE 400 400
  UNITS dd 

  EXTENT -2260028.875000 -354486.541988 1583700.875000 3150588.604488
  PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 192 192 192
  IMAGEQUALITY 95
  IMAGETYPE png
  OUTPUTFORMAT
    NAME png
    DRIVER 'GD/PNG'
    MIMETYPE 'image/png'
    #IMAGEMODE PC256
    EXTENSION 'png'
  END
  # Legend
  LEGEND
    IMAGECOLOR 255 255 255
    STATUS ON
    KEYSIZE 18 12
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 0 89
    END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
    # Set IMAGEPATH to the path where MapServer should
    # write its output.
    IMAGEPATH '/tmp/'
 
    # Set IMAGEURL to the url that points to IMAGEPATH
    # as defined in your web server configuration
    IMAGEURL '/tmp/' 

    # WMS server settings
    METADATA
      'wms_title'           'test map'
      'wms_onlineresource'  'http://localhost/cgi-bin/mapserv?map=/home/demo/mapserver/test.map&'
      'wms_srs'             'EPSG:4326'
    END 

    #Scale range at which web interface will operate
    # Template and header/footer settings
    # Only the template parameter is required to display a map. See MapServer documentation
  END 

  LAYER
    NAME 'ak_shade'
    TYPE RASTER
    DATA '/home/demo/qgis_sample_data/ak_shade.tif'
    METADATA
      'wms_title' 'ak_shade'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    
    END
  END 

  LAYER
    NAME 'alaska'
    TYPE POLYGON
    DATA '/home/demo/qgis_sample_data/alaska.shp'
    METADATA
      'wms_title' 'alaska'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    
    END
    CLASS
       NAME 'alaska' 
       STYLE
         SYMBOL 0 
         SIZE 3 
         OUTLINECOLOR 0 0 0
         COLOR 111 158 72
       END
    END
  END 

  LAYER
    NAME 'canada'
    TYPE POLYGON
    DATA '/home/demo/qgis_sample_data/canada.shp'
    METADATA
      'wms_title' 'canada'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    
    END
    CLASS
       NAME 'canada' 
       STYLE
         SYMBOL 0 
         SIZE 3 
         OUTLINECOLOR 0 0 0
         COLOR 114 58 48
       END
    END
  END 

  LAYER
    NAME 'lakes'
    TYPE POLYGON
    DATA '/home/demo/qgis_sample_data/lakes.shp'
    METADATA
      'wms_title' 'lakes'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    
    END
    CLASS
       NAME 'lakes' 
       STYLE
         SYMBOL 0 
         SIZE 3 
         OUTLINECOLOR 0 0 0
         COLOR 71 142 107
       END
    END
  END 

  LAYER
    NAME 'majrivers'
    TYPE LINE
    DATA '/home/demo/qgis_sample_data/majrivers.shp'
    METADATA
      'wms_title' 'majrivers'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    
    END
    CLASS
       NAME 'majrivers' 
       STYLE
         SYMBOL 0 
         SIZE 3 
         OUTLINECOLOR 44 232 27
         COLOR 0 0 0
       END
    END
  END 

  LAYER
    NAME 'russia'
    TYPE POLYGON
    DATA '/home/demo/qgis_sample_data/russia.shp'
    METADATA
      'wms_title' 'russia'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    
    END
    CLASS
       NAME 'russia' 
       STYLE
         SYMBOL 0 
         SIZE 3 
         OUTLINECOLOR 0 0 0
         COLOR 33 127 194
       END
    END
  END

END