• Advertisement
Sign in to follow this  

DEM to heightmap

This topic is 2903 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Searched and found lots of very dated posts, but nothing recent. I have data in DEM format. I want to make a heightmap from it. I cannot find any working conversion software. Anyone know what to use these days? I tried MicroDEM and got tons of errors on startup. I think it is too dated to run on Windows 7. I also searched for 3DEM, which seems to no longer be supported by its developer.

Share this post


Link to post
Share on other sites
Advertisement
IIRC DEM is an ascii file format so you should be able to open it up in a text editor and figure out how to write your own data conversion tool.

It's a regularly spaced grid so their shouldn't be any tricky stuff. Just slap each number to a vertex's height coord on your regularly spaced 2D vertex grid.

-me

Share this post


Link to post
Share on other sites
It's not. It is binary for sure, my hex editor says so.

The site says the DEMS are "1/3 arc gridlfoat". There are tons of labels so I don't know what the hell it is. But the site is evidently where everyone gets satellite data.

http://gisdata.usgs.gov/website/seamless/viewer.htm

They give you back a zip full of files. I assume I am looking at the right one with the .flt extension. The html page tells me about the scale.

It wont open in any text editor I have.

[Edited by - brekehan on March 15, 2010 11:40:03 PM]

Share this post


Link to post
Share on other sites
gridFloat is a "raw" format. The flt file contains only the elevation data as floats. The corresponding .hdr file contains information on its dimensions and geographic location. The .prj file contains the geographic projection information which can be ignored if all data you have uses the same projection.

In order to use it, you need to read the .hdr file and extract the ncols and nrows values. These define the dimensions of the grid.

Share this post


Link to post
Share on other sites
An app you might find useful is MicroDEM http://www.usna.edu/Users/oceano/pguth/website/microdem/microdem.htm

It lets you convert between various heightmap types.

Share this post


Link to post
Share on other sites
ive written dem loaders in the past years ago
from memory theres normally info supplied (usually another file) on what the file contains, eg 10000x10000 data points at 16bit height or whatever
and the dem file is just the raw data

yes just had a quick look at a couple of files on my HD + this was the case

Share this post


Link to post
Share on other sites
Okie Dokie. I'll try and write a parser this weekend. Appreciate the helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement