# The annotated map file (sort of)
# Created by Pericles S. Nacionales for the MapServer tutorial
# 2005-04-08
# Maintained & enhanced since by Jeff McKenna, GatewayGeo
# 2023-04-19 last updated
#
# 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.9_
  IMAGETYPE      PNG24
  EXTENT        166221 -371954 1505849 632767 # LAEA
  #EXTENT         -97.5 41.619778 -82.122902 49.38562 # Geographic
  SIZE           400 300
  SHAPEPATH      "../data"
  SYMBOLSET      "../symbols/symbols.txt"
  FONTSET        "../fonts/fonts.txt"

  # 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
    TEMPLATE  'example1-9.html'
    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 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.
  #
  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
    NAME         "states"
    DATA         "states_ugl.shp"
    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    "CLASS"	
    LABELITEM    "STATE"		

    CLASS
      EXPRESSION 'land'
      STYLE
        SYMBOL     0
        COLOR      232 232 232
      END
	  
      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 # States polygon layer ends here

  LAYER # MODIS raster layer begins here
    NAME         "modis"
    DATA         "raster/mod09a12003161_ugl_ll_8bit.tif"
    STATUS       OFF #DEFAULT
    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 NASA
    NAME         "modis_nasa"
    TYPE         RASTER
    OFFSITE      0 0 0
    STATUS       OFF
    CONNECTIONTYPE WMS
    CONNECTION "https://neo.sci.gsfc.nasa.gov/wms/wms?"
    
    METADATA
      "wms_srs" "EPSG:4326"
      "wms_name" "MOD_143D_RR"
      "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.shp"
    STATUS       OFF
    TYPE         LINE

    PROJECTION
      "init=epsg:4326"
    END

    CLASSITEM    "CLASS"
    CLASS
      EXPRESSION 'land'
      STYLE
        SYMBOL     'line5'
        COLOR      32 32 32
        SIZE       1
      END
    END
  END # States line layer ends here

  # End of LAYER DEFINITIONS -------------------------------

END # All map files must come to an end just as all other things must come to...
# End of section 1 !
