Digital Elevation Model data importer

Hey mom, look, another newbie …

Hi everybody.
First post here, so please be patient
I’m tweaking around with blender and python in my too-little-spare-time and, as a beginner project, with another guy I wrote a Digital Elevation Model data importer for Blender (SRTM earth elevation).
Hoping this could be useful, we would like to share our result.
The first usable version (with doc) could be downloaded from the page
The page, well the whole site, was built in a hurry: if the script could be of some interest I could enrich it and upload some nice sceenshot.

Critics and comments welcome
Let me know

Looks interesting :=)


Seems interesting indeed. Where can you get SRMT data? I looked at GTOPO and you have to pay dearly for it.

Home page for SRTM data is:

data sets could be freely downloaded by anonymous ftp from:

I suppose they are free because they are ‘raw’: they are not processed with other sources to recover from (eventual) missing data.

Fortunately the DEM importer script could make a filtering these missing data :wink: (reducing the overall resolution) :wink:

Wow! That’s a great script! Cheers.

One thing, I tried it on a partial set of .hgt files for Australia and found that I had to change the line

fName += "S%2d" % (lat)


fName += "S%2d" % (-lat)

because the filenames for south-of-the-equator don’t have a negative latitude.

Also, is it possble to make it use a partial dataset, or do you need all the files ?

Yeah, like if I d/l’ed N47W068.hgt, how would I get any part of that to show up?

ooops … :expressionless:
thanks for the feedback.
fixed it, and tested with the west australian coast.
cannot upload it now, i will do tomorrow.

Also, is it possble to make it use a partial dataset, or do you need all the files ?

well, the hgt files must be integer (cannot subdivide one file in smaller chunks); if you need to import only a subset of a file, you can specify a Lat & Lon interval “inside” a file, and the script will take only the relevant part.

Same bug as for celeriac, fixed.
d/l’ed and imported N47W068.hgt ok, but the landscape itself is almost flat.

Stay tuned … :wink:


By ‘partial’ I meant a subset of the files (not a subset of a file) - say I’d only downloaded a few of them in a given solid angle because I’m on a dial-up connection. It looks as though the loop assumes that all files corresponding to lat/long numbers given are present. Could it be changed so that it completes as much as it can ?

Enzoblue - You can get a more complete dataset if you pull the same area as a GeoTIFF which can be found here
This can then be converted over to an Ascii DEM either by using a command line program called “gdal_convert.exe” or by using a freeware program called 3DEM.

Here is some info on the “hgt” files -
">From the Documentation directory:

“Height files have the extension .HGT and are signed two byte integers.
The bytes are in Motorola “big-endian” order with the most significant byte
first, directly readable by systems such as Sun SPARC, Silicon Graphics and
Macintosh. DEC Alpha and most PCs use Intel (“little-endian”) order so some byte-swapping may be necessary. Heights are in meters referenced to the WGS84 geoid. Data voids are assigned the value -32768.”

You end up with a mesh like this in Blender

Ok, fixed and uploaded the 0.0.4 version.
Uploaded even a couple of screenshots in the gallery (more to come)

now I see (after 1:00am my brain get out of sync)
yes, by now the loops tries to read all the files associated with a solid angle
if not found it gives all the area corrisponding to the missing files a zero height.
Cannot implement all at once :smiley:

Hope this helps

It works beautifully - cheers!

Works awesome now. Small FYI, I found a really nice map thing to find the lat and longs of places, it’s really cool. Take a look here.

Another one I like to use is Once you request the address, look in th URL and the lat and long are part of the URL.

I just found this earlier set of posts and hope it isn’t too late to ask for additional capability.
I read the pdf manual quickly and saw the example displayed in this post.
It isn’t immediately apparent that placing the cursor on the screen displays latitude (lat) and longitude (long) coordinates like many geographic information systems (GIS) viewers. I know that Blender is not a GIS viewer. Would it be possible to modify your script to display the lat and long coordinates in decimal form or some other useful form for wherever the cursor is placed on the mesh? You’ve done good work, and I hope that this extra capability is easily added.