Raster Layer, Extent, etc.
Ian Harding
iharding at TPCHD.ORG
Tue Jul 5 13:21:24 PDT 2005
I have no idea what I am doing.
I can get mapserver to work as advertised with vector data (geographic
coordinate system) and with raster data (some other crazy coordinate
system) but can't get the twain to meet.
When I change the extent (as seen in the commented section) one or the
other layers will display, but not both. I have controls that
successfully turn the layers off and on in isolation, so I know it's not
the DEFAULT versus ON issue.
The system seems to be very forgiving of bad stuff (or absense of any
stuff) in the "projection" section, and the "units" just screws up the
scalebar, but the "extent" seems to be killing me.
There is only one "extent" section, which applies to the whole mapfile,
right? From what I have read, the various layers can use different
coordinate systems and be 'translated' to the overall mapfile extent and
coordinate system. This is not working for me.
What could be causing my pain here?
Thank you in advance....
- Ian
MAP
IMAGETYPE PNG24
EXTENT -122.5 46.5 -121.8 47.8
UNITS DD
# Uncommenting these (and commenting the above) makes the raster image
appear.
# EXTENT 1060000.000000 460000.000000 1460000.000000 660000.000000
# UNITS FEET
SIZE 400 300
SHAPEPATH "pierceco"
IMAGECOLOR 255 255 255
PROJECTION
"proj=latlong"
"datum=NAD83"
"init=epsg:32149"
END
SYMBOLSET "symbols/symbols35.sym"
FONTSET "fonts/fonts.list"
WEB
TEMPLATE 'pierce.html'
IMAGEPATH '/data/tmp/'
IMAGEURL '/tmp/'
END
# Start of scalebar
#
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 0 0 0
SIZE TINY
END
STYLE 1
SIZE 100 2
COLOR 0 0 0
UNITS MILES
INTERVALS 2
TRANSPARENT FALSE
STATUS ON
END
# Start of LAYER DEFINITIONS
---------------------------------------------
LAYER
CONNECTIONTYPE postgis
NAME "counties"
# Connect to a remote spatial database
CONNECTION "user=user dbname=dbname host=localhost"
DATA "the_geom from gis.wa_counties"
STATUS ON
TYPE POLYGON
FILTER "true"
LABELITEM "name"
CLASS
COLOR 232 232 232
OUTLINECOLOR 32 32 32
LABEL
COLOR 0 0 0
OUTLINECOLOR 255 255 255
TYPE TRUETYPE
FONT arial
SIZE 10
ANTIALIAS TRUE
END
END
END
LAYER
NAME "relief"
STATUS ON
TILEINDEX "topo.shp"
TILEITEM "location"
TYPE RASTER
# PROJECTION
# I was told this data was in "State Plane Feet NAD 83 WA South
4602"
# Have tried all kinds of incantations in this section to no
effect.
# END
END
# End of LAYER DEFINITIONS -------------------------------
END # end of map file/object
More information about the MapServer-users
mailing list