Loading

HGT 2 STL Converter

by DWilbourn, published

HGT 2 STL Converter by DWilbourn Jun 30, 2013

Description

A small program to read Digital Elevation Model HGT files (Space Shuttle Radar Tomography) or Image files and convert them to STLs

Recent Comments

view all
Hi there
Thanks for that. Do you know what a more accurate setting should be ?
All the tiles I've looked at seem to have problems with the bottom faces. The side faces are perfect.
For example, I have downloaded SI34 (Southern Cape - RSA): S33E018 (You can choose any tile in this range, I suspect). The faces that make up the southern edge do not make a closed seam in relation to the topography (The east faces do close properly)
Another question: Can the generated image be saved to a large high def image file?
Thanks for the comments. I must confess I have not done anything with the program since I posted it - it was just a fun project at the time...
It's true the vertical scaling is far from accurate in the default setting. It was done more for effect and fun than topographical accuracy and academics. You can set it to a much smaller value though to be more accurate.
I'm not sure what you mean by the 'bottom side faces'. I know I had some problems initially with getting the sides and bottom to make solid faces but I thought that was sorted by the time I posted it. It may be that the geo-tile you are using has some odd combination of contours that is throwing stuff off. If you could let me know which tile it is I can try it out.
Hi There
This is great - many thanks for your generosity in sharing your app.
I have been playing around with this, and have noticed that the STLs being generated have features that appear to be around ten times higher than they should be (this is only a visual approximation). What am I doing wrong / missing?
(I rescale the STL to a more reasonable height ration)
I noticed also that if an entire tile geo-tile is processed, then the bottom side faces do not match the topography, and leave openings and overlaps.

Makes

Liked By

view all

License

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

*v0.3.0.0 Added support for importing images. These are converted to greyscale and can then be converted to STLs

  • Added a 'base' option that can be trimmed to the object / landmass or cover the full extend of the area.
  • Redesigned the interface.
    v 0.2.0.0 Rounding error caused some latitudes to generate errors. Fixed in this version.
    v 0.1.1 Improved error checking - errors can send an error report to me if you choose.

HTG files can be downloaded from http://www.viewfinderpanoramas.org/dem3.html. on the map (http://www.viewfinderpanoramas.org/Coverage%20map%20viewfinderpanoramas_org3.htm) select an area to download the zipped tiles for that area. Unzip and select a tile in HGT2STL.exe. A greyscale image of the tile is shown. Water (or actually height = 0) is blue. Draw over an area to export just a portion of the map, set 'Desample' to reduce the resolution of the map. Select 'Save as ASCII STL' to output a map.

The program is - and will only ever be - Windows only! Sorry, but that is what I know and use. (Delphi XE3 source is available)

Generated STLs are ASCII format. I may add binary in the future - time and interest permitting....

Max resolution for these maps is about 1 facet = 90m. Higher res DEMs are available - for a price! This porgram can only read the HGT format though.

Program is quick & dirty - almost NO error checking!

PBill4.zip & La Palma are zipped ASCII STLs of the maps shown in the screenshots.

Hi There
This is great - many thanks for your generosity in sharing your app.
I have been playing around with this, and have noticed that the STLs being generated have features that appear to be around ten times higher than they should be (this is only a visual approximation). What am I doing wrong / missing?
(I rescale the STL to a more reasonable height ration)
I noticed also that if an entire tile geo-tile is processed, then the bottom side faces do not match the topography, and leave openings and overlaps.
Thanks for the comments. I must confess I have not done anything with the program since I posted it - it was just a fun project at the time...
It's true the vertical scaling is far from accurate in the default setting. It was done more for effect and fun than topographical accuracy and academics. You can set it to a much smaller value though to be more accurate.
I'm not sure what you mean by the 'bottom side faces'. I know I had some problems initially with getting the sides and bottom to make solid faces but I thought that was sorted by the time I posted it. It may be that the geo-tile you are using has some odd combination of contours that is throwing stuff off. If you could let me know which tile it is I can try it out.
Hi there
Thanks for that. Do you know what a more accurate setting should be ?
All the tiles I've looked at seem to have problems with the bottom faces. The side faces are perfect.
For example, I have downloaded SI34 (Southern Cape - RSA): S33E018 (You can choose any tile in this range, I suspect). The faces that make up the southern edge do not make a closed seam in relation to the topography (The east faces do close properly)
Another question: Can the generated image be saved to a large high def image file?
quick note on my work flow from a few sources
Get a dem file
Open in microdem.exe
Show as greyscale no label etc
Export as jpg
Open in hgt2stl
Export to STL
Open in meshmixer which tidies it up
Save as
Open in Adobe print utility (turn off support) -seems to be the only way I can get a slic3able scaled model
Save as

Open in slic3r
Slic3
A bit convoluted but worked for me.
BTW do you know of any sites for doing the same thing with lake depths that will work with this software?
Sorry, I know almost nothing on this subject - just what I found using Google a couple of nights ago! I would imagine that any lake depth data is going to be country specific & specialist - which probably equals expensive.

The program as it stands can only handle the HGT files - which are always positive heights above sea level. I chop off anything that is at height zero or below to make the coastline. I have not looked at potentially valid negative heights such as the Dead sea.....
You may want to add a base layer feature so you can print multiple land masses.
Added a Base layer - this can be a percentage thickness of the main model and can either be trimmed to the object or the full extent of the source data.
Thanks for the suggestion, I will put it on the list of possible improvements!
"Access violation at address 0095B1A7 in module 'HGT2STL.exe'. Write of address 00000000."
Error tracked & fixed. See new version 0.2.0.0 (problem was a rounding error at this specific latitude)
Thank you!!!
New version with better error report uploaded.
Top