getting elevation data from mapserver

Brent Fraser bfraser at GEOANALYTIC.COM
Mon Nov 26 07:02:03 PST 2007


Maarten,

  If you use GlobalMapper to export the elevation to
GeoTIFF, make sure you select Elevation from the File Type
list on the GeoTIFF Export Options, otherwise it exports it
as a color-coded image.  GDAL/Mapserver will then be able to
read the 16-bit integer (or 32-bit float) data GlobalMapper
exports.

  If you don't want to use GlobalMapper and you have .hgt
(likely SRTM data?), you can create an .hdr header file for
each .hgt file so GDAL/Mapserver will load them, or you can
wait for GDAL 1.5.0 to be released (it can read them without
header files).

Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta

----- Original Message ----- 
From: "Maarten Hilgenga" <maartenhilgenga at GMAIL.COM>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, November 26, 2007 3:22 AM
Subject: [UMN_MAPSERVER-USERS] getting elevation data from
mapserver


> Dear all,
>
> I'm trying to output elevation data in dem format as
described in the
> WCS server example. The elevation data is in dted format
(hgt file).
> Since gdalinfo doesn't recognize this file as useable,
I've used
> global mapper to convert it to geotiff. The geoTiff is
1201x1201 and
> has three bands:
>
> Band 1 Block=1201x1 Type=Byte, ColorInterp=Red
> Band 2 Block=1201x1 Type=Byte, ColorInterp=Green
> Band 3 Block=1201x1 Type=Byte, ColorInterp=Blue
>
> The output from mapserver is 800 x 600 and has three bands
as well,
>
> Band 1 Block=800x5 Type=Int16, ColorInterp=Gray
> Band 2 Block=800x5 Type=Int16, ColorInterp=Undefined
> Band 3 Block=800x5 Type=Int16, ColorInterp=Undefined
>
> When I load the resulting file as geotiff into global
mapper, I get a
> black image. The height of the whole map is at least
1000m. Does
> anyone know how to display this elevation data? Could it
be that the
> elevation is first converted to 8 bit and then to 16?
>
> TIA, Maarten



More information about the MapServer-users mailing list