[Gdal-dev] Parse DEM file problem

Chapman, Martin MChapman at sanz.com
Wed May 5 18:09:24 EDT 2004


Bruce,

1.  No problem, hope it is of some help.  I agree, we are reading the
data the same way as far as I can tell.  That's correct, I am
re-aligning the bits to fit in a windows DIB section.  Elevation data
only needs this if you want to show it as an image in windows.  If
you're dealing with a 3D mesh (like in opengl) you just use the height,
x, and y values.

2.  Correct, no need to interleave bits if you are not showing an image.

3.  Not sure what to do about the bad values you are seeing except maybe
to code around it.

4.  The GT030 files may have been written by an application that doesn't
meet the standards...not sure on that one.  You can send me an example
file and I would be glad to tell you if I see the same problem.

Martin

-----Original Message-----
From: Clay, Bruce [mailto:bclay at ball.com] 
Sent: Wednesday, May 05, 2004 3:50 PM
To: gdal-dev at remotesensing.org
Subject: RE: [Gdal-dev] Parse DEM file problem


Martin:
  Thanks for your reply.  It looks like we are retrieving the data the
same way. I am not totally sure what you are doing after the retrieval
but it looks like you are scaling the data back to 8 bits then combining
the values from separate files to create a single image which you
display as a DIB.

In a comment you mentioned interleaving the bits.  For elevation (DEM)
files, doesn't each value represent the altitude in meters for that
point.  That is from the file origin (say 20 deg w, 40 deg N +
(pixelSize * pixelPosition).  

The interesting point is that the high min and max values returned by
GDAL seemed to match the pixel data I encountered but they are way out
of range from the values indicated in the GTOPO30 documentation.

I'll read some more of the doc to see what shows up but something really
seems out of whack.  Most probably in my code but it is basically a cut
and paste from the GDAL code

MicroDem also has a problem reading these files.  These are the standard
GTO30 files downloaded off the net.


Bruce
bclay at ball.com
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev



More information about the Gdal-dev mailing list