new to mapserver - map won't display!!

Laura Neher lneher at ON.PELMOREX.COM
Fri Oct 28 16:47:02 EDT 2005


Good Afternoon!



I am new to mapserver and I’m having some problems getting my map to run. I
suspect the cause is in the mapfile.map but I can’t seem to figure out
where it is.



I have two files that I would like to display. The first is a polygon file
of census areas that I would like to class based on population density. The
second is road features. I expect to be adding more to this but I’m just
trying to get a good start. Any assistance on what I’m missing would be
greatly appreciated.



Thanks!



Laura



MAPFILE.map



# Start of map file

#

MAP

  NAME MyMap

  STATUS ON

  SIZE 600 450

  # Map extent from ArcMAP dialog "Date Frame Properties > Data Frame"

  EXTENT  -81.77192 46.095211 -80.262369 47.068479

  UNITS DD

  SHAPEPATH "myData"

  TEMPLATEPATTERN "webpage"

  IMAGECOLOR 255 255 255

  IMAGETYPE PNG



  #

  # Projection definition

  # In most cases, MapServer also works without a detailed definition

  #

  # PROJECTION

  #   "proj=utm"

  #   "ellps=GRS80"

  #   "zone=15"

  #   "north"

  #   "no_defs"

  #   OR:

  #   "init=epsg:26915"

  # END



  #

  # Start of reference map

  #

  # A full extent image needs to be exported from ArcMap

  # ("File > Export Map... > *.PNG")

  # The size of this image can be changed with an image editing program

  #

  REFERENCE

    # Name of the image file as you saved it

    IMAGE reference.png

    # Extent information from ArcMap dialog "Date Frame Properties > Data
Frame"

    EXTENT -81.77192 46.095211 -80.262369 47.068479

    # The current size of the image in pixels (see graphics program)

    SIZE 207 196

    STATUS ON

    MINBOXSIZE 5

    MAXBOXSIZE 100

    COLOR -1 -1 -1

    OUTLINECOLOR 128 0 0

    MARKERSIZE 8

    MARKER 'star'

  END



  #

  # Start of legend

  #

  LEGEND

    KEYSIZE 18 12

    LABEL

      TYPE BITMAP

      SIZE MEDIUM

      COLOR 0 0 89

    END

    STATUS ON

  END



  #

  # Start of scalebar

  #

  SCALEBAR

    IMAGECOLOR 255 255 255

    LABEL

      COLOR 0 0 0

      SIZE TINY

    END

    STYLE 1

    SIZE 100 2

    COLOR 255 255 255

    UNITS KILOMETERS

    INTERVALS 2

    TRANSPARENT TRUE

    STATUS ON

  END



  #

  # Start of layer definitions

  #



  LAYER

    # This layer name has to be identical to the Shapefile name for the
layer

    # (this is a bug in MapServer)

    NAME Sudbury_populationi

    TYPE POLYGON

    STATUS ON

    # Shapefile name in folder "myData"

    DATA Sudbury_populationi

    # Five classes have been defined for population density

    # Class 1:

    CLASS

      EXPRESSION (([Pop_DEN] > 0) AND ([Pop_DEN] < 45))

      NAME "Population Density 5-44/sqkm"

      STYLE

        OUTLINECOLOR 110 110 110

        COLOR 255 255 204

      END

    END

    # Class 2:

    CLASS

      EXPRESSION (([Pop_DEN] > 44) AND ([Pop_DEN] < 407))

      NAME "Population Density 45-406/sqkm"

       STYLE

       OUTLINECOLOR 110 110 110

        COLOR 194 230 154

      END

    END

    # Class 3:

       CLASS

         EXPRESSION (([Pop_DEN] > 406) AND ([Pop_DEN] < 819))

         NAME "Population Density 407-818/sqkm"

          STYLE

          OUTLINECOLOR 110 110 110

           COLOR 121 199 123

         END

    END

     # Class 4:

        CLASS

          EXPRESSION (([Pop_DEN] > 818) AND ([Pop_DEN] < 1606))

          NAME "Population Density 819-1605/sqkm"

           STYLE

           OUTLINECOLOR 110 110 110

            COLOR 49 163 83

          END

    END

     # Class 5:

        CLASS

          EXPRESSION ([Pop_DEN] < 1605)

          NAME "Population Density 1606-2533/sqkm"

           STYLE

           OUTLINECOLOR 110 110 110

            COLOR 0 105 56

          END

    END

  END



  LAYER

    # This layer name has to be identical to the Shapefile name for the
layer

    # (this is a bug in MapServer)

    NAME Major_roads

    # Filename in folder "myData"

    DATA Major_roads

    TYPE LINE

    STATUS ON

    # Only one class:

    CLASS

      NAME Name

      STYLE

        COLOR 255 0 0

      END

    END

    TOLERANCE 3

  END



END



More information about the mapserver-users mailing list