[mapserver-commits] r8771 - trunk/docs/tutorial

svn at osgeo.org svn at osgeo.org
Tue Mar 10 13:03:06 EDT 2009


Author: jmckenna
Date: 2009-03-10 13:03:06 -0400 (Tue, 10 Mar 2009)
New Revision: 8771

Added:
   trunk/docs/tutorial/example1-6-map.txt
   trunk/docs/tutorial/example1-7-map.txt
   trunk/docs/tutorial/example1-8-map.txt
Modified:
   trunk/docs/tutorial/example1-6.txt
   trunk/docs/tutorial/example1-7.txt
   trunk/docs/tutorial/example1-8.txt
Log:
add example mapfile with styles

Added: trunk/docs/tutorial/example1-6-map.txt
===================================================================
--- trunk/docs/tutorial/example1-6-map.txt	                        (rev 0)
+++ trunk/docs/tutorial/example1-6-map.txt	2009-03-10 17:03:06 UTC (rev 8771)
@@ -0,0 +1,204 @@
+.. _example1-6-map:
+
+Example1-6.map
+--------------
+
+.. code-block:: mapfile
+
+	# The annotated map file (sort of)
+	# Created by Pericles S. Nacionales for the MapServer tutorial
+	# 20050408
+	#
+	# MapServer map file uses the pound sign (#) to denote the start of a line
+	# comment--each line that needs to be commented has to be prepended with a "#".
+	#
+	# Map files begin with MAP keyword to signify the start of the map object.
+	# Well, the entire map file is THE map object.  Enclosed between MAP and END
+	# at the very bottom of this map file, are keyword/value pairs and other
+	# objects.
+	MAP
+	  IMAGETYPE      PNG24
+	  # EXTENT 199949.651166 -371954.772084 1472121.6862 632767.19157
+	  EXTENT       201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA
+		  #EXTENT         -97.5 41.619778 -82.122902 49.38562 # Geographic
+	  SIZE           400 300
+	  SHAPEPATH      "../data"
+	  SYMBOLSET      "../symbols/symbols35.sym"
+	  FONTSET        "../fonts/fonts.list"
+	
+	  # The projection object is typically used within the map and the layer
+	  # objects. You only define it once within the map object and this definition
+	  # becomes your output projection--MapServer will render your maps in this
+	  # projection.  You also use the projection object within the layer object to 
+	  # define your input projection.  Your layers can be in different 
+	  # projections--MapServer will reproject them into your output projection.  
+	  # If no projection is defined within the layer object, MapServer assumes 
+	  # your input projection is the same as your output projection.  This is not 
+	  # a required object unless you're creating a map file that supports one of 
+	  # the OGC interoperability web services specifications (WMS/WFS/WCS).
+	  #
+	  # This is the output PROJECTION definition ------
+	  PROJECTION
+	    # Projection parameters can be defined in two ways...
+	    # This is the traditional Proj.4 definition of Lambert Azimuthal Equal-Area
+	    # projection for the Continental U.S.
+	      "proj=laea"
+	      "ellps=clrk66"
+	      "lat_0=45"
+	      "lon_0=-100"
+	
+	    # Alternatively, you can specify an EPSG code.
+	    # This is the EPSG code for Lambert Azimuthal Equal-Area
+	    # projection for the U.S.
+	    #
+	    # "init=epsg:2163"
+	  END # End of the output Projection definition ---
+	
+	  # Layer objects are defined beneath the map object.  You need at least one
+	  # layer defined in your map file before you can display a map...  You can
+	  # define as many layers as you'd like although a limit is typically hard-coded
+	  # in map.h in the MapServer source.  The default limit is set at 100.  You'd
+	  # have to have a very specialized application to need more than 100 layers in
+	  # your application.
+	  #
+	  # Start of LAYER DEFINITIONS ---------------------------------------------
+	  LAYER # States polygon layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         POLYGON
+	
+	    # Here's an example of the input projection definition.
+	    # EPSG:4326 is code for geographic (latlong) projection
+	    # using the WGS84 datum.
+	    #
+	    # PROJECTION objects within the LAYER object define the input
+	    # projection--this is the native projection of your data.
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    # CLASSITEM defines the non-spatial attribute that you will be using to
+	    # separate a layer into classes.  This attribute will be in the DBF file
+	    # of your shapefile (it will be different for each data format).  In this
+	    # example the shapefile states_ugl has an associated database 
+	    # (states_ugl.dbf) that contains an attribute called "CLASS".  You will be
+	    # using two values in the CLASS attribute to separate the classes (also 
+	    # called themes) used in this layer--land and water.  CLASSITEM is used in 
+	    # association with the EXPRESSION parameter in the CLASS object.  See below.
+	    CLASSITEM    "CLASS"
+	
+	    # The class object is defined within the layer object.  You can define as
+	    # many classes as you need (well, there are limits as with layers, but it's
+	    # senseless to define more than ten on a "normal" layer.  There are
+	    # situations, however, where you might have to do it.)
+	    CLASS
+	      NAME 'States'
+	      EXPRESSION 'land'
+	
+	      # There are styles in a class, just like there are classes in a layer,
+	      # just like there are layers in a map.  You can define multiple styles in
+	      # a class just as you can define multiple classes in a layer and multiple
+	      # layers in a map.
+	      STYLE
+	        COLOR      232 232 232
+	      END
+	    END
+	  END # States polygon layer ends here
+	
+	  # In addition to vector data (shapefiles are vector data), MapServer supports
+	  # a host of raster formats.  In GIS world, one of the most common raster
+	  # formats is GeoTIFF, a TIFF image with geospatial headers.  MapServer also
+	  # supports JPEG, PNG, GIF, and other common formats.  Other raster formats
+	  # supported by MapServer include ESRI Arc/Info grid, HDF and HDF-EOS, NetCDF, 
+	  # Generic raster binaries, OGC Web Map Service (WMS) layers, etc.  Pretty much 
+	  # any raster format you can think of is probably supported, thanks to the
+	  # impressive Geospatial Data Abstraction Library (GDAL, pronounced "GOODALL"
+	  # or GOODLE?).  More information on GDAL is available at http://www.gdal.org.
+	  #
+	  # MapServer 4.x can read and display bitmapped (like GIFs), RGB/A (true
+	  # color), and multispectral (images with more than 3 bands, like raw LandSat
+	  # images) rasters.
+	  LAYER # MODIS raster layer begins here
+	    NAME         modis
+	    DATA         "raster/mod09a12003161_ugl_ll_8bit.tif"
+	    STATUS       OFF
+	    TYPE         RASTER
+	    PROCESSING   "BANDS=1,2,3"
+	    OFFSITE      71 74 65
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	  END # MODIS raster layer ends here
+	
+	  LAYER # States line layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         LINE
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    CLASSITEM    "CLASS"
+	    CLASS
+	      NAME       'State Boundary'
+	      EXPRESSION 'land'
+	      STYLE
+	        SYMBOL     'line5'
+	        COLOR      64 64 64
+	        SIZE       1
+	      END
+	    END
+	  END # States line layer ends here
+	
+	  LAYER # States label layer begins here
+	    NAME         states_label
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         ANNOTATION
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	    
+	    CLASSITEM    "CLASS"
+	
+	    # Just like CLASSITEM, LABELITEM defines the database attribute that you
+	    # will be using to draw labels.  In this case, the values of the attribute
+	    # "STATE" will be used to label the states polygons.
+	    LABELITEM    "STATE"
+	    CLASS
+	      EXPRESSION 'land'
+	      STYLE
+	        COLOR      -1 -1 -1
+	      END
+	
+	      # There can be labels in a class, just like there are classes in a layer,
+	      # just like there are layers in a map.  You can define multiple labels in
+	      # a class just as you can define multiple classes in a layer and multiple
+	      # layers in a map.
+	      # MapServer has a very flexible labeling system.  With that flexibility
+	      # comes complexity, specially when using truetype fonts.  Please read 
+	      # through the LABEL section of the MapServer map file documentation at
+	      # http://ms.gis.umn.edu/docs/reference/mapfile for more information.
+	      LABEL
+	        COLOR 132 31 31
+	        SHADOWCOLOR 218 218 218
+	        SHADOWSIZE 2 2
+	        TYPE TRUETYPE
+	        FONT arial-bold
+	        SIZE 12
+	        ANTIALIAS TRUE
+	        POSITION CL
+	        PARTIALS FALSE
+	        MINDISTANCE 300
+	        BUFFER 4
+	      END # end of label
+	    END # end of class
+	  END # States label layer ends here
+	  # End of LAYER DEFINITIONS -------------------------------
+	
+	END # All map files must come to an end just as all other things must come to...

Modified: trunk/docs/tutorial/example1-6.txt
===================================================================
--- trunk/docs/tutorial/example1-6.txt	2009-03-10 15:47:21 UTC (rev 8770)
+++ trunk/docs/tutorial/example1-6.txt	2009-03-10 17:03:06 UTC (rev 8771)
@@ -17,7 +17,7 @@
 
 This example attempts to shed some light on the projection support in MapServer.
 
-This is what the mapfile looks like: `Example1-6.map <http://biometry.gis.umn.edu/tutorial/example1-6.map>`_.
+This is what the mapfile looks like: :ref:`Example1-6.map <example1-6-map>`
 
 The first thing you might have noticed with our mapfile is the original EXTENT 
 has been commented out and the new EXTENT values don't look anything like 

Added: trunk/docs/tutorial/example1-7-map.txt
===================================================================
--- trunk/docs/tutorial/example1-7-map.txt	                        (rev 0)
+++ trunk/docs/tutorial/example1-7-map.txt	2009-03-10 17:03:06 UTC (rev 8771)
@@ -0,0 +1,264 @@
+.. _example1-7-map:
+
+Example1-7.map
+--------------
+
+.. code-block:: mapfile
+
+	# The annotated map file (sort of)
+	# Created by Pericles S. Nacionales for the MapServer tutorial
+	# 20050408
+	#
+	# MapServer map file uses the pound sign (#) to denote the start of a line
+	# comment--each line that needs to be commented has to be prepended with a "#".
+	#
+	# Map files begin with MAP keyword to signify the start of the map object.
+	# Well, the entire map file is THE map object.  Enclosed between MAP and END
+	# at the very bottom of this map file, are keyword/value pairs and other
+	# objects.
+		MAP
+	  IMAGETYPE      PNG24
+	  EXTENT        201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA
+		  #EXTENT         -97.5 41.619778 -82.122902 49.38562 # Geographic
+	  SIZE           400 300
+	  SHAPEPATH      "../data"
+	  SYMBOLSET      "../symbols/symbols35.sym"
+		  FONTSET        "../fonts/fonts.list"
+	
+	  # The projection object is typically used within the map and the layer
+	  # objects. You only define it once within the map object and this definition
+		  # becomes your output projection--MapServer will render your maps in this
+	  # projection.  You also use the projection object within the layer object to
+	  # define your input projection.  Your layers can be in different
+		  # projections--MapServer will reproject them into your output projection.
+	  # If no projection is defined within the layer object, MapServer assumes
+	  # your input projection is the same as your output projection.  This is not
+	  # a required object unless you're creating a map file that supports one of
+	  # the OGC interoperability web services specifications (WMS/WFS/WCS).
+	  #
+	  # This is the output PROJECTION definition ------
+	  PROJECTION
+	    # Projection parameters can be defined in two ways...
+	    # This is the traditional Proj.4 definition of Lambert Azimuthal Equal-Area
+		    # projection for the Continental U.S.
+	    #  "proj=laea"
+	    #  "ellps=clrk66"
+	    #  "lat_0=45"
+		    #  "lon_0=-100"
+	    #
+	    # Alternatively, you can specify an EPSG code.
+	    # This is the EPSG code for Lambert Azimuthal Equal-Area
+	    # projection for the U.S.
+	    "init=epsg:2163"
+		 END
+	  
+	  # The web object is defined at the level below the map object.  All
+	  # web-related parameters (I interchange "parameters" and "keyword/value
+	  # pairs" quite frequently, sorry about that) are defined in this object.
+	  WEB
+	    IMAGEPATH "/ms4w/tmp/"
+	    IMAGEURL  "/tmp/"
+	    LOG "/ms4w/log/mslog"
+	  END
+	
+	  # Layer objects are defined beneath the map object.  You need at least one
+	  # layer defined in your map file before you can display a map...  You can
+	  # define as many layers as you'd like although a limit is typically hard-coded
+	  # in map.h in the MapServer source.  The default limit is set at 100.  You'd
+		  # have to have a very specialized application to need more than 100 layers in
+	  # your application.
+	  #
+	  # Start of LAYER DEFINITIONS ---------------------------------------------
+	  LAYER # States polygon layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         POLYGON
+	
+	    # Here's an example of the input projection definition.
+	    # EPSG:4326 is code for geographic (latlong) projection
+	    # using the WGS84 datum.
+	    #
+	    # PROJECTION objects within the LAYER object define the input
+	    # projection--this is the native projection of your data.
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    # CLASSITEM defines the non-spatial attribute that you will be using to
+	    # separate a layer into classes.  This attribute will be in the DBF file
+	    # of your shapefile (it will be different for each data format).  In this
+	    # example the shapefile states_ugl has an associated database
+	    # (states_ugl.dbf) that contains an attribute called "CLASS".  You will be
+	    # using two values in the CLASS attribute to separate the classes (also
+	    # called themes) used in this layer--land and water.  CLASSITEM is used in
+	    # association with the EXPRESSION parameter in the CLASS object.  See below.
+	    CLASSITEM    "CLASS"
+	
+	    # The class object is defined within the layer object.  You can define as
+	    # many classes as you need (well, there are limits as with layers, but it's
+	    # senseless to define more than ten on a "normal" layer.  There are
+	    # situations, however, where you might have to do it.)
+	    CLASS
+	      NAME 'States'
+	      EXPRESSION 'land'
+	
+	      # There are styles in a class, just like there are classes in a layer,
+	      # just like there are layers in a map.  You can define multiple styles in
+	      # a class just as you can define multiple classes in a layer and multiple
+	      # layers in a map.
+	      STYLE
+	        COLOR      232 232 232
+	      END
+	    END
+	  END # States polygon layer ends here
+	
+	  # In addition to vector data (shapefiles are vector data), MapServer supports
+	  # a host of raster formats.  In GIS world, one of the most common raster
+	  # formats is GeoTIFF, a TIFF image with geospatial headers.  MapServer also
+	  # supports JPEG, PNG, GIF, and other common formats.  Other raster formats
+	  # supported by MapServer include ESRI Arc/Info grid, HDF and HDF-EOS, NetCDF, 
+	  # Generic raster binaries, OGC Web Map Service (WMS) layers, etc.  Pretty much 
+	  # any raster format you can think of is probably supported, thanks to the
+	  # impressive Geospatial Data Abstraction Library (GDAL, pronounced "GOODALL"
+	  # or GOODLE?).  More information on GDAL is available at http://www.gdal.org.
+	  #
+	  # MapServer 4.x can read and display bitmapped (like GIFs), RGB/A (true
+	  # color), and multispectral (images with more than 3 bands, like raw LandSat
+	  # images) rasters.
+	  LAYER # MODIS raster layer begins here
+	    NAME         modis
+	    DATA         "raster/mod09a12003161_ugl_ll_8bit.tif"
+	    STATUS       OFF
+	    TYPE         RASTER
+	    PROCESSING   "BANDS=1,2,3"
+	    OFFSITE      71 74 65
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	  END # MODIS raster layer ends here
+	
+	  # MapServer can consume (in ESRI parlance) layers from other map servers as
+	  # long as those servers are Web Mapping Service (WMS) providers.  WMS is a 
+	  # web service specification from Open Geospatial Consortium (OGC) and is
+	  # intended to be an interoperability standard for web mapping applications.  
+	  # This allows us to display layers we don't usually have (or can't store in 
+	  # our computers due to space limitations).  The downside is that we have to 
+	  # depend on some other server to display our layer, and that server can be 
+		  # down when you really need it.  The cool thing is that JPL has a WMS server 
+	  # that serves out MODIS and LandSat maps for the whole world--try storing 
+	  # those datasets on your computer!
+	  LAYER # MODIS WMS map from JPL
+	    NAME         modis_jpl
+	    TYPE         RASTER
+	    OFFSITE      0 0 0
+	    STATUS       OFF
+	    CONNECTIONTYPE WMS
+	    CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?"
+	    
+	    METADATA
+	      "wms_srs" "EPSG:4326"
+	      "wms_name" "modis"
+	      "wms_server_version" "1.1.1"
+	      "wms_format" "image/jpeg"
+	    END
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	  END # Modis WMS image ends here
+	
+	  LAYER # States line layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         LINE
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    CLASSITEM    "CLASS"
+	    CLASS
+	      NAME       'State Boundary'
+	      EXPRESSION 'land'
+	      STYLE
+	        SYMBOL     'line5'
+	        COLOR      32 32 32
+	        SIZE       1
+	      END
+	    END
+	  END # States line layer ends here
+	  
+	  LAYER # States line layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         LINE
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    CLASSITEM    "CLASS"
+	    CLASS
+	      NAME       'State Boundary'
+	      EXPRESSION 'land'
+	      STYLE
+	        SYMBOL     'line5'
+	        COLOR      32 32 32
+	        SIZE       1
+	      END
+	    END
+	  END # States line layer ends here
+	
+	  LAYER # States label layer begins here
+	    NAME         states_label
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         ANNOTATION
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	    
+	    CLASSITEM    "CLASS"
+	
+	    # Just like CLASSITEM, LABELITEM defines the database attribute that you
+	    # will be using to draw labels.  In this case, the values of the attribute
+	    # "STATE" will be used to label the states polygons.
+	    LABELITEM    "STATE"
+	
+	    CLASS
+	      EXPRESSION 'land'
+	      STYLE
+	        COLOR      -1 -1 -1
+	      END
+	
+	      # There can be labels in a class, just like there are classes in a layer,
+	      # just like there are layers in a map.  You can define multiple labels in
+	      # a class just as you can define multiple classes in a layer and multiple
+	      # layers in a map.
+	      # MapServer has a very flexible labeling system.  With that flexibility
+	      # comes complexity, specially when using truetype fonts.  Please read
+	      # through the LABEL section of the MapServer map file documentation at
+	      # http://ms.gis.umn.edu/docs/reference/mapfile for more information.
+	      LABEL
+	        COLOR 132 31 31
+	        SHADOWCOLOR 218 218 218
+	        SHADOWSIZE 1 1
+	        TYPE TRUETYPE
+	        FONT arial-bold
+	        SIZE 12
+	        ANTIALIAS TRUE
+	        POSITION CL
+	        PARTIALS FALSE
+	        MINDISTANCE 200
+	        BUFFER 4
+	      END # end of label
+	    END # end of class
+	  END # States label layer ends here
+	  # End of LAYER DEFINITIONS -------------------------------
+	
+	END # end of map file
\ No newline at end of file

Modified: trunk/docs/tutorial/example1-7.txt
===================================================================
--- trunk/docs/tutorial/example1-7.txt	2009-03-10 15:47:21 UTC (rev 8770)
+++ trunk/docs/tutorial/example1-7.txt	2009-03-10 17:03:06 UTC (rev 8771)
@@ -32,8 +32,7 @@
 The MapFile
 ###########
 
-This is what the mapfile looks like: `Example1-7.map
-<http://biometry.gis.umn.edu/tutorial/example1-7.map>`_.
+This is what the mapfile looks like: :ref:`Example1-7.map <example1-7-map>`
 
 LAYER Object and WMS Parameters
 *******************************

Added: trunk/docs/tutorial/example1-8-map.txt
===================================================================
--- trunk/docs/tutorial/example1-8-map.txt	                        (rev 0)
+++ trunk/docs/tutorial/example1-8-map.txt	2009-03-10 17:03:06 UTC (rev 8771)
@@ -0,0 +1,264 @@
+.. _example1-8-map:
+
+Example1-8.map
+--------------
+
+.. code-block:: mapfile
+
+	# The annotated map file (sort of)
+	# Created by Pericles S. Nacionales for the MapServer tutorial
+	# 20050408
+	#
+	# MapServer map file uses the pound sign (#) to denote the start of a line
+	# comment--each line that needs to be commented has to be prepended with a "#".
+	#
+	# Map files begin with MAP keyword to signify the start of the map object.
+	# Well, the entire map file is THE map object.  Enclosed between MAP and END
+	# at the very bottom of this map file, are keyword/value pairs and other
+	# objects.
+	MAP
+	  NAME           EX1.8_
+	  EXTENT         201621.496941 -294488.285333 1425518.020722 498254.511514 # LAEA
+	  #EXTENT         -97.5 41.619778 -82.122902 49.38562 # Geographic
+	  SIZE           400 300
+	  IMAGECOLOR     255 255 255
+	  SHAPEPATH      "../data"
+	  SYMBOLSET      "../symbols/symbols35.sym"
+	  FONTSET        "../fonts/fonts.list"
+	
+	  IMAGETYPE PNG24
+	
+	  OUTPUTFORMAT
+	    NAME png
+	    DRIVER "GD/PNG"
+	    MIMETYPE "image/png"
+	    IMAGEMODE PC256
+	    EXTENSION "png"
+	  END
+	  OUTPUTFORMAT
+	    NAME png24
+	    DRIVER "GD/PNG"
+	    MIMETYPE "image/png"
+	    IMAGEMODE RGBA
+	    EXTENSION "png"
+	  END
+	  OUTPUTFORMAT
+	    NAME jpeg
+	    DRIVER "GD/JPEG"
+	    FORMATOPTION "QUALITY=75"
+	    MIMETYPE "image/jpeg"
+	    IMAGEMODE RGB
+	    EXTENSION "jpg"
+	  END
+	  OUTPUTFORMAT
+	    NAME GTiff
+	    DRIVER "GDAL/GTiff"
+	    MIMETYPE "image/tiff"
+	    IMAGEMODE RGB
+	    EXTENSION "tif"
+	  END
+	  #OUTPUTFORMAT
+	  #  NAME pdf
+	  #  MIMETYPE "application/x-pdf"
+	  #  DRIVER pdf
+	  #  #FORMATOPTION "OUTPUT_TYPE=RASTER" # not mandatory but needed for WMS layer
+	  #END
+	  OUTPUTFORMAT
+	    NAME AGG
+	    DRIVER "AGG/PNG"
+	    IMAGEMODE RGB
+	  END
+	  OUTPUTFORMAT
+	    NAME AGGA
+	    DRIVER "AGG/PNG"
+	    IMAGEMODE RGBA
+	  END
+	  OUTPUTFORMAT
+	    NAME AGGJ
+	    DRIVER "AGG/JPEG"
+	    IMAGEMODE RGB
+	  END
+	
+	  # The web object is defined at the level below the map object.  All
+	  # web-related parameters (I interchange "parameters" and "keyword/value
+	  # pairs" quite frequently, sorry about that) are defined in this object.
+	  WEB
+	    IMAGEPATH '/ms4w/tmp/ms_tmp/'
+	    IMAGEURL  '/ms_tmp/'
+	  END
+	
+	  # The projection object is typically used within the map and the layer
+	  # objects. You only define it once within the map object and this definition
+	  # becomes your output projection--MapServer will render your maps in this
+	  # projection.  You also use the projection object within the layer object to 
+	  # define your input projection.  Your layers can be in different 
+	  # projections--MapServer will reproject them into your output projection.  
+	  # If no projection is defined within the layer object, MapServer assumes 
+	  # your input projection is the same as your output projection.  This is not
+	  # a required object unless you're creating a map file that supports one of 
+	  # the OGC interoperability web services specifications (WMS/WFS/WCS).
+	  #
+	  # This is the output PROJECTION definition ------
+	  PROJECTION
+	    # Projection parameters can be defined in two ways...
+	    # This is the traditional Proj.4 definition of Lambert Azimuthal Equal-Area
+	    # projection for the Continental U.S.
+	    #  "proj=laea"
+	    #  "ellps=clrk66"
+	    #  "lat_0=45"
+	    #  "lon_0=-100"
+	    #
+	    # Alternatively, you can specify an EPSG code.
+	    # This is the EPSG code for Lambert Azimuthal Equal-Area
+	    # projection for the U.S.
+	    "init=epsg:2163"
+	  END
+	
+	  # Layer objects are defined beneath the map object.  You need at least one
+	  # layer defined in your map file before you can display a map...  You can
+	  # define as many layers as you'd like although a limit is typically hard-coded
+	  # in map.h in the MapServer source.  The default limit is set at 100.  You'd
+	  # have to have a very specialized application to need more than 100 layers in
+	  # your application.
+	  #
+	  # Start of LAYER DEFINITIONS ---------------------------------------------
+	  LAYER # States polygon layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         POLYGON
+	
+	    # Here's an example of the input projection definition.
+	    # EPSG:4326 is code for geographic (latlong) projection
+	    # using the WGS84 datum.
+	    #
+	    # PROJECTION objects within the LAYER object define the input
+	    # projection--this is the native projection of your data.
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    # CLASSITEM defines the non-spatial attribute that you will be using to
+	    # separate a layer into classes.  This attribute will be in the DBF file
+	    # of your shapefile (it will be different for each data format).  In this
+	    # example the shapefile states_ugl has an associated database 
+	    # (states_ugl.dbf) that contains an attribute called "CLASS".  You will be
+	    # using two values in the CLASS attribute to separate the classes (also
+	    # called themes) used in this layer--land and water.  CLASSITEM is used in 
+	    # association with the EXPRESSION parameter in the CLASS object.  See below.
+	    CLASSITEM    "CLASS"
+	
+	    # The class object is defined within the layer object.  You can define as
+	    # many classes as you need but it is good cartographic practice to limit 
+	    # classes to 8 to 10 per layer. (There are also limits as with layers and 
+	    # it's senseless to define more than ten on a "normal" layer.  There are
+	    # situations, however, where you might have to do it.)
+	    CLASS
+	      EXPRESSION 'land'
+	      STYLE
+	        SYMBOL     0
+	        COLOR      232 232 232
+	      END
+	    END
+	  END # States polygon layer ends here
+	
+	  # In addition to vector data (shapefiles are vector data), MapServer supports
+	  # a host of raster formats.  In GIS world, one of the most common raster
+	  # formats is GeoTIFF, a TIFF image with geospatial headers.  MapServer also
+	  # supports JPEG, PNG, GIF, and other common formats.  Other raster formats
+	  # supported by MapServer include ESRI Arc/Info grid, HDF and HDF-EOS, NetCDF, 
+	  # Generic raster binaries, OGC Web Map Service (WMS) layers, etc.  Pretty much 
+	  # any raster format you can think of is probably supported, thanks to the
+	  # impressive Geospatial Data Abstraction Library (GDAL, pronounced "GOODALL"
+	  # or GOODLE?).  More information on GDAL is available at http://www.gdal.org.
+	  #
+	  # MapServer 4.x can read and display bitmapped (like GIFs), RGB/A (true
+	  # color), and multispectral (images with more than 3 bands, like raw LandSat
+	  # images) rasters.
+	  LAYER # MODIS raster layer begins here
+	    NAME         modis
+	    DATA         "raster/mod09a12003161_ugl_ll_8bit.tif"
+	    STATUS       OFF
+	    TYPE         RASTER
+	    PROCESSING   "BANDS=1,2,3"
+	    OFFSITE      71 74 65
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	  END # MODIS raster layer ends here
+	
+	  LAYER # MODIS WMS map from JPL
+	    NAME         modis_jpl
+	    TYPE         RASTER
+	    OFFSITE      0 0 0
+	    STATUS       OFF
+	    CONNECTIONTYPE WMS
+	    CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?"
+	
+	    METADATA
+	      "wms_srs" "EPSG:4326"
+	      "wms_name" "modis"
+	      "wms_server_version" "1.1.1"
+	      "wms_format" "image/jpeg"
+	    END
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	  END # Modis WMS image ends here
+	  
+	  LAYER # States line layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         LINE
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    CLASSITEM    "CLASS"
+	    CLASS
+	      EXPRESSION 'land'
+	      STYLE
+	        #SYMBOL     'line1'
+	        COLOR      32 32 32
+	        #SIZE       1
+	      END
+	    END
+	  END # States line layer ends here
+	
+	  LAYER # States label layer begins here
+	    NAME         states
+	    DATA         states_ugl
+	    STATUS       OFF
+	    TYPE         ANNOTATION
+	
+	    PROJECTION
+	      "init=epsg:4326"
+	    END
+	
+	    CLASSITEM    "CLASS"
+	    LABELITEM    "STATE"
+	    CLASS
+	      EXPRESSION 'land'
+	      STYLE
+	        COLOR      -1 -1 -1
+	      END
+	      LABEL
+	        COLOR    255 255 255
+	        TYPE     TRUETYPE
+	        FONT     arial-bold
+	        SIZE     12
+	        ANTIALIAS    TRUE
+	        POSITION     CL
+	        PARTIALS     FALSE
+	        MINDISTANCE  300
+	        BUFFER       4
+	      END # end of label
+		    END # end of class
+	  END # States label layer ends here
+	  # End of LAYER DEFINITIONS -------------------------------
+	
+	END # end of map file

Modified: trunk/docs/tutorial/example1-8.txt
===================================================================
--- trunk/docs/tutorial/example1-8.txt	2009-03-10 15:47:21 UTC (rev 8770)
+++ trunk/docs/tutorial/example1-8.txt	2009-03-10 17:03:06 UTC (rev 8771)
@@ -15,7 +15,7 @@
 The MapFile
 ###########
 
-Here's the mapfile: `Example1-8.map <http://biometry.gis.umn.edu/tutorial/example1-8.map>`_.
+Here's the mapfile: :ref:`Example1-8.map <example1-8-map>`
 
 OUTPUTFORMAT Object
 *******************



More information about the mapserver-commits mailing list