I have a basic question about my MapServer .map file, which has two layers, each with a different coordinate system, longlat vs. mercator.
See my .map file below. If I leave it as shown below, with the "version 2" UNITS/EXTENT active, it correctly draws my "MrSid" in the right place on the earth, but doesn't draw my "shape layer" layer. On the other hand, if I comment out the "version 2" UNITS/EXTENT and activate the "version 1" UNITS/EXTENT, it then draws "shape layer" but not "MrSid".
So it's acting like the the UNITS/EXTENT has to match those of the layer for the layer to be drawn. Is that right? If so, how do I mix layers with different UNITS?
(By the way, I also have a secondary question about this .map file. If I don't include any PROJECTION entry at the outer/MAP level, it will draw the "shape layer" layer but not the "MrSid" layer. But if I add a PROJECTION, regardless of whether the projection is "proj=longlat" "ellps=WGS84" "datum=WGS84"
or "proj=merc" "lon_0=0" "k=1" "x_0=0" "y_0=0" "a=6378137" "b=6378137" "towgs84=0,0,0,0,0,0,0" "units=m"
, it will draw either layer -- but not both at the same time, as per the main issue above. So my secondary question is why it seems to be happy using a default projection with my longlat shape file, but not with my mercator MrSid file.)
MAP
IMAGETYPE PNG
# version 1
# UNITS dd
# EXTENT -180 -90 180 90
# version 2
UNITS meters
EXTENT -20037508.34 -20037508.34 20037508.34 20037508.34
SIZE 550 450
INTERLACE OFF
PROJECTION
# "proj=longlat" "ellps=WGS84" "datum=WGS84"
"proj=merc" "lon_0=0" "k=1" "x_0=0" "y_0=0" "a=6378137" "b=6378137" "towgs84=0,0,0,0,0,0,0" "units=m"
END
SHAPEPATH "../data"
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
FORMATOPTION INTERLACE=OFF
TRANSPARENT OFF
END
# Start of LAYER DEFINITIONS-------------------------------
LAYER
NAME "shape layer"
DATA dourokukan
STATUS DEFAULT
TYPE LINE
CLASS
NAME "“shape class"
STYLE
COLOR 227 227 127
END
END
END
LAYER
NAME "MrSid"
DATA "c:\mrsid\adams\ortho_1-1_1n_s_nd001_2010_1.sid"
STATUS DEFAULT
TRANSPARENCY 100
TYPE RASTER
PROJECTION
"proj=utm" "ellps=GRS80" "datum=NAD83" "zone=13" "units=m"
END
LABELITEM ""
TEMPLATE VOID
END
# End of LAYER DEFINITIONS -------------------------------
END