using Mapserver for on-the-fly raster data?
Jeff de La Beaujardiere
jeff2005 at SVS.GSFC.NASA.GOV
Wed Jul 6 15:30:18 PDT 2005
Frank Warmerdam wrote:
> As of 4.6 (actually it might have been in 4.4 too), MapServer supports
> the ability to apply classification to non-8bit raster data.
OK, I have this mostly working in test mode with just a few colors.
However, there remains a problem that I have not yet solved and may be
an SRS/EPSG/WMS issue. The raw binary input file has data from 0 to 360
longitude, rather than -180 to 180. If my GetMap request has
BBOX=-180,-90,180,90 I only get data in the East half of the image while
the West half is blank. Some component apparently does not understand
that longitude wraps around. I can get a complete image if
BBOX=0,-90,360,90, but I do need to be able to use negative values for
longitude.
Am I missing something, or is there a workaround for this problem?
Relevant snippets of my mapfile and VRT file are appended.
-Jeff DLB
--------------
LAYER
NAME "vrt"
TYPE RASTER
STATUS on
PROJECTION
"init=epsg:4326"
END
DATA "/home/delabeau/wms/test/precp.vrt"
PROCESSING "SCALE=0,2"
PROCESSING "SCALE_BUCKETS=4"
CLASSITEM "[pixel]"
CLASS
EXPRESSION ([pixel] < 0.5)
COLOR 206 29 0
END
CLASS
EXPRESSION ([pixel] >= 0.5 AND [pixel] < 1.0)
COLOR 225 115 0
END
CLASS
EXPRESSION ([pixel] >= 1.0 AND [pixel] < 1.5)
COLOR 237 170 0
END
CLASS
EXPRESSION ([pixel] >= 1.5)
COLOR 255 255 0
END
METADATA
"wms_title" "Test VRT with GEOS4"
"wms_layer_group" "/TestLayers"
"wms_extent" "0 -90 360 90"
END
END
--------------
<VRTDataset rasterXSize="1000" rasterYSize="721">
<SRS>EPSG:4326</SRS>
<GeoTransform>0, 0.36, 0, 90, 0, -0.25</GeoTransform>
<VRTRasterBand dataType="Float32" band="1" subClass="VRTRawRasterBand">
<SourceFilename>/path/file</SourceFilename>
<ImageOffset>602756000</ImageOffset>
<PixelOffset>4</PixelOffset>
<LineOffset>4000</LineOffset>
<ByteOrder>MSB</ByteOrder>
<ColorInterp>Palette</ColorInterp>
</VRTRasterBand>
</VRTDataset>
More information about the MapServer-users
mailing list