Opened 13 years ago
Closed 13 years ago
#4205 closed defect (invalid)
serving DTED via WCS fails with GDAL/DTED driver
Reported by: | hammack | Owned by: | Frank Warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | 1.8.0 |
Severity: | normal | Keywords: | DTED WCS |
Cc: |
Description
I am trying to serve DTED data in its native format using WCS with mapserver 6.0.0 on Slackware 13.1. If I serve the data as a 16-bit GeoTIFF or do a WCS 2.0.0 GetCoverage with a PNG output, the images look good. But when I serve the same data using the GDAL/DTED driver the .dt1 file contains only 0 values for the data when using GetCoverage. Interestingly, shp2img gives me a file with nothing but 21074 (0x5252) for the data values. In both cases the output of gdalinfo looks okay.
So it seems like mapserver is finding the data okay, but gdal (1.8.0) is not writing the dt1 file properly.
"gdal_translate -of DTED in.dt1 out.dt1" works okay.
# this works OUTPUTFORMAT
NAME "GEOTIFFINT16" DRIVER "GDAL/GTiff" MIMETYPE "image/tiff" IMAGEMODE "INT16" EXTENSION "tif"
END
shp2img -m dted1.map -i PNG -l "elevation" -o fred.dt1 -e -90.0 30.0 -89.0 31.0 # works
# this does not OUTPUTFORMAT
NAME "DTED" DRIVER "GDAL/DTED"
IMAGEMODE "INT16"
EXTENSION "dt1"
END
shp2img -m dted1.map -i DTED -l "elevation" -o fred.dt1 -e -90.0 30.0 -89.0 31.0 # contains 0x5252 values only
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Returning all zeros was caused by an invalid projection specified in the mapfile. When EPSG:4326 is specified, valid tiles are returned *as long as they are requested individually*.
This works:
shp2img -m dted1.map -o -i DTED -l "elevation" out.dt1 -e -90. 30. -89. 31. -s 1201 1201
but this does not:
shp2img -m dted1.map -o -i DTED -l "elevation" out.dt1 -e -90. 30. -89. 32. -s 1201 2401
Requesting an area larger than one DTED tile results in a returned tile that is always 1201x1201 pixels regardless of the geographical area or pixel size specified. The data returned does not match the area requested.
As Frank says, "...you should not depend on this driver for producing files with arbitrary bounds, resolution and coordinate system."
If I specify the size when running shp2img:
shp2img -m dted1.map -o -i DTED -l "elevation" out.dt1 -e -90. 30. -89. 31. -s 1201 1201
then the output matches what I see from mapserver = all zeros (instead of 0x5252 reported earlier).