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

http://localhost/cgi-bin/mapserv?map=/mapserver/dted1.map&SERVICE=WCS&VERSION=2.0.0&REQUEST=GetCoverage&coverageid=elevation&format=png&subset=lon_axis,http://www.opengis.net/def/crs/EPSG/0/4326(-90.0,-89.0)&subset=lat_axis,http://www.opengis.net/def/crs/EPSG/0/4326(30.0,31.0)


# 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

http://localhost/cgi-bin/mapserv?map=/mapserver/dted1.map&SERVICE=WCS&VERSION=2.0.0&REQUEST=GetCoverage&coverageid=elevation&format=DTED&subset=lon_axis,http://www.opengis.net/def/crs/EPSG/0/4326(-90.0,-89.0)&subset=lat_axis,http://www.opengis.net/def/crs/EPSG/0/4326(30.0,31.0) # contains zero values only

Change History (2)

comment:1 by hammack, 13 years ago

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).

comment:2 by hammack, 13 years ago

Resolution: invalid
Status: newclosed

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."

Note: See TracTickets for help on using tickets.