[mapserver-users] Mapfile & Brain Damage

Kieran J. Ames kames at keyspanenergy.com
Fri Mar 8 17:00:05 EST 2002


List,
Sorry if I'm asking the obvious, but I decided to stop spinning my
wheels and start asking for help.

In a nutshell, I can't get all layers to render when I select them.
Depending on where I place them in the mapfile (or if I place them in
the mapfile at all), there seems to be an impact on the remaining
layers.

I'm trying to set up data layers for Census 2000 data. I downloaded the
Census Regions, Divisions, ZCTAs, Tracts, Block groups and Blocks. (For
the record, many of these polygon layers are like parent/child polygons.
For instance, a polygon of Census tracts would be the border for several
block groups. If I were to zoom into a block group, its border would be
the same for many (child) blocks. Therefore, if they were placed on top
of each other, (and depending on the order in which they are defines),
one might obscure the detail of the other.

No problem there. I'd expect that. But, I can't seem to put all these
layers in one mapfile and select any individual ONE and be sure it will
work.

The mapfile follows. I've moved layers around and around with no
consistent results. Right now, they are in the following order:
LAYER # Census_Tracts_Northeast_USA
LAYER # Census_Block_Groups_Northeast_USA
LAYER # Connecticut Blocks
LAYER # Massachusetts Blocks
LAYER # New Hampshire Blocks
LAYER # New Jersey Blocks
LAYER # Rhode Island Blocks
LAYER # New York Blocks (Downstate Area Only)
LAYER # Major_Highways
LAYER # Census_ZCTAs_Northeast_USA
LAYER # Cities
LAYER # Census_Divisions
LAYER # Census_Regions

Any guidance appreciated.
Kieran


#################################################

NAME Census_2000
SIZE 500 400
IMAGECOLOR 166 202 240 # A6CAF0 # Ocean Blue
#EXTENT -76.622    37.303    -68.061    45.626
EXTENT -134.304871 11.605812 -56.418810 69.988443 # USA
#  -74.259832  40.470558 -71.854168 41.317442 # NYC & Long Island
#  -75.782502  36.751918 -64.684638 45.608683 # NYC
#  -75.782502  36.751918 -64.684638 45.608683 # Long Island
#  -71.311839  42.079295 -70.645395 42.612033 # Boston

SHAPEPATH "/maps/Census/"
SYMBOLSET '../symbols/symbols.sym'
FONTSET   '../symbols/fonts/fonts.list'

UNITS DD
#MARKERSET "../symbols/marker.sym"
#
# Start of web interface definition
#
WEB
  TEMPLATE 'Census.html'
  IMAGEPATH 'g:\maps\tmp\'
  IMAGEURL '/mapserv/tmp/'
END  #WEB
#
# Start of reference map
#
#REFERENCE
#  SIZE 150 160
#  IMAGE g:\_PublicWebSite\wwwroot/maps/census/ref_test.map.gif
#  EXTENT -75.560 38.929 -69.928 45.305
#  STATUS OFF
#  COLOR -1 -1 -1
#  OUTLINECOLOR 255 0 0
#END  #REFERENCE
#
# Start of legend
#
LEGEND
  IMAGECOLOR 205 205 205
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
    POSITION UR
  END
  STATUS on
END   #LEGEND

#
# Start of scalebar
#
SCALEBAR
  STATUS EMBED
  IMAGECOLOR 205 205 205
  LABEL
    COLOR 0 0 254
    OUTLINECOLOR 255 255 255
    SIZE MEDIUM
  END  #LABEL
  SIZE 300 5
  COLOR  0 0 250
  BACKGROUNDCOLOR 255 0 255
  OUTLINECOLOR 128 0 0
  UNITS MILES
  POSITION UR
#  INTERVALS 10
#  TRANSPARENT TRUE
  STATUS on
END   #SCALEBAR


###################################################
######     Start of layer definitions        ######
###################################################



# BEGIN CENSUS TRACTS
LAYER # Census_Tracts_Northeast_USA
  NAME "Census_Tracts_Northeast_USA"
  TYPE Polygon
  STATUS ON
  DATA 'Tracts/focus_northeast_tracts'
      CLASS
        Name 'Census Tracts'
        COLOR 221 83 91
        OUTLINECOLOR 0 0 254
     END  # CLASS
END  # LAYER

# BEGIN CENSUS BLOCK-GROUPS
LAYER # Census_Block_Groups_Northeast_USA
  NAME "Census Block Groups"
  TYPE Polygon
  STATUS OFF
  DATA 'BlockGroups/focus_northeast_blockgroups'
      CLASS
        Name 'FOCUS_northeast_blockgroups.shp'
        COLOR 24 129 47
        OUTLINECOLOR 0 0 254
     END  # CLASS
END  # LAYER

# BEGIN CENSUS BLOCKS
LAYER # Connecticut Blocks
  NAME "Connecticut Blocks"
  TYPE Polygon
  STATUS OFF
  DATA 'Blocks/009-blocks'
      CLASS
        Name 'Connecticut Blocks'
        COLOR 230 218 3
        OUTLINECOLOR 0 0 254
     END  # CLASS

END  # LAYER

LAYER # Massachusetts Blocks
  NAME "Massachusetts Blocks"
  TYPE Polygon
  STATUS OFF
  DATA 'Blocks/025-blocks'
      CLASS
        Name 'Massachusetts Blocks'
        COLOR 108 207 28
        OUTLINECOLOR 0 0 254
     END  # CLASS

END  # LAYER

LAYER # New Hampshire Blocks
  NAME "New Hampshire Blocks"
  TYPE Polygon
  STATUS OFF
  DATA 'Blocks/033-blocks'
      CLASS
        Name 'New Hampshire Blocks'
        COLOR 92 233 225
        OUTLINECOLOR 0 0 254
     END  # CLASS

END  # LAYER

LAYER # New Jersey Blocks
  NAME "New Jersey Blocks"
  TYPE Polygon
  STATUS OFF
  DATA 'Blocks/034-blocks'
      CLASS
        Name 'New Jersey Blocks'
        COLOR 136 59 26
        OUTLINECOLOR 0 0 254
     END  # CLASS

END  # LAYER

LAYER # Rhode Island Blocks
  NAME "Rhode Island Blocks"
  TYPE Polygon
  STATUS OFF
  DATA 'Blocks/044-blocks'
      CLASS
        Name 'Rhode Island Blocks'
        COLOR 1 191 134
        OUTLINECOLOR 0 0 254
     END  # CLASS

END  # LAYER

LAYER # New York Blocks (Downstate Area Only)
  NAME "New York Blocks"
  TYPE Polygon
  STATUS Off
  DATA 'Blocks/036-downstate_blocks'
      CLASS
        Name 'Downstate NY Census Blocks'
        COLOR 208 251 86
        OUTLINECOLOR 0 0 254
     END  # CLASS

END  # LAYER


# BEGIN HIGHWAY LAYER
LAYER # Major_Highways
 NAME 'Major_Highways'
 DATA '/maps/data/national/usroute'
 STATUS OFF
 TYPE LINE
# LABELITEM 'ROUTE_NUM'
 CLASS
    NAME 'Major Highways'
 COLOR 0 0 0
  SYMBOL gas_pipe
    SIZE 20
 END # CLASS
END # LAYER


LAYER # Census_ZCTAs_Northeast_USA
  NAME "Zipcode Tabulation Areas"
  TYPE POLYLINE
  STATUS OFF
  DATA 'ZCTA/focus_northeast_zcta'
  STATUS OFF
  CLASS
 NAME "ZCTA"
 COLOR 128 128 128
 SYMBOL 0
#        OUTLINECOLOR 0 0 254
  END # Class
END  # LAYER


LAYER # Cities
  NAME Cities
  TYPE POINT
  STATUS OFF
  DATA "../data/ESRIDATA/USA/cities"
  CLASSITEM "POP1990"
  LABELITEM CITY_NAME
  CLASS
    NAME "Pop LT 200000"
    EXPRESSION (([POP1990] > 50000) and ([POP1990] < 200001))
    SYMBOL FILLED_TRIANGLE
    SIZE 10
#    OUTLINECOLOR 0
    COLOR 0 0 0
  END
  CLASS
    NAME "Pop GT 200000"
    EXPRESSION ([POP1990] > 200000)
    SYMBOL circle
    SIZE 10
#    OUTLINECOLOR 0
    COLOR 255 0 0
  END
END  # CLASSITEM
END  # LAYER





LAYER # Census_Divisions
  NAME "Census_Divisions"
  TYPE Polyline
  STATUS OFF
  DATA 'Divisions/dv99_d00'
    CLASSITEM 'NAME'
      CLASS
        NAME "East North Central"
        EXPRESSION 'East North Central'
        SYMBOL     0
        COLOR      192 101 73
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "East South Central"
        EXPRESSION 'East South Central'
        SYMBOL     0
        COLOR      255 215 0
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "Middle Atlantic"
        EXPRESSION 'Middle Atlantic'
        SYMBOL     0
        COLOR      189 183 107
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "Mountain"
        EXPRESSION 'Mountain'
        SYMBOL     0
        COLOR      247 181 103
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "New England"
        EXPRESSION 'New England'
        SYMBOL     0
        COLOR      206 195 149
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "Pacific"
        EXPRESSION 'Pacific'
        SYMBOL     0
        COLOR      205 155 29
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "South Atlantic"
        EXPRESSION 'South Atlantic'
        SYMBOL     0
        COLOR      240 230 140
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "West North Central"
        EXPRESSION 'West North Central'
        SYMBOL     0
        COLOR      167 175 94
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "West South Central"
        EXPRESSION 'West South Central'
        SYMBOL     0
        COLOR      192 144 88
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "No Data"
        EXPRESSION 'No Data'
        SYMBOL     0
        COLOR      -1 -1 -1
        OUTLINECOLOR 0 0 254
     END  # CLASS

END  # CLASSITEM
END  # LAYER

LAYER # Census_Regions
  NAME "Census_Regions"
  TYPE POLYGON
  STATUS DEFAULT
  DATA 'Regions/rg99_d00'
    CLASSITEM 'NAME'
      CLASS
        NAME "Midwest"
        EXPRESSION 'Midwest'
        SYMBOL     0
        COLOR      192 101 73
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "Northeast"
        EXPRESSION 'Northeast'
        SYMBOL     0
        COLOR      255 215 0
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "South"
        EXPRESSION 'South'
        SYMBOL     0
        COLOR      189 183 107
        OUTLINECOLOR 0 0 254
     END  # CLASS

      CLASS
        NAME "West"
        EXPRESSION 'West'
        SYMBOL     0
        COLOR      247 181 103
        OUTLINECOLOR 0 0 254
     END  # CLASS

#      CLASS
#        NAME "No Data"
#        EXPRESSION 'No Data'
#        SYMBOL     0
#        COLOR      -1 -1 -1
#        OUTLINECOLOR 0 0 254
#     END  # CLASS
END  # CLASSITEM
END  # LAYER

END  # MAPFILE







More information about the mapserver-users mailing list