I have a SRTM 30m DEM of my area. I want to create a physical 3D terrain map from it (from felt, 3D printer, you name it). I have two questions about this process:

With grass r.contour I created contour lines from the DEM, and with v.generalize I smoothed the contour lines. Some of those contour lines still have gaps in them though. How can I make those contour lines smoother and interpolate in between so that two isolines that have the same elevation and have a 10m gap between them, are actually connected.

And more importantly, I would like to know how I can make polygons that correspond to the whole surface area with that height, so I can print those polygons (and cut them from felt, or input them in a 3D printer) to create polygons that I can stack on top of each other and create a 3D terrain map. How can I do this? I already have the isolines, the land outline and the bounding box outline for my area. I just need to somehow connect the isolines to the bounding box and land outline to create a polygon, for each isoline.

Any suggestions? I mainly use grass and qgis, but any other FOSS package is fine as well.

  • How about generating triangles and exporting them in 3D?
    – markusN
    Commented Jul 6, 2015 at 6:27

1 Answer 1


Maybe a slightly different approach will match your needs. Try looping thru all the elevations that you will be snipping from felt, and create a raster for each, then convert each to a polygon vector. You'll end up with lots of separate polygons, one for each elevation, ready for the scissors.

For e in 10 20 30 40 50 60 70 80 90 100; do
    r.mapcalc "elev_$e = if(dem <= $e, $e, null())";
    r.to.vect -s -v input=elev_$e output=elev_poly_$e feature=area;
    g.remove -f rast=elev_$e;
  • I did it the following way, but you're solution was pretty nice. Thanks a lot. for e in 10 20 30 40 50 60 70 80 90 100; do r.mapcalc "elev_$e = if(SRTMPH <= $e, $e, null())" r.to.vect -s -v input=elev_$e output=elev_poly_$e feature=area g.remove -f rast=elev_$e done Commented Jul 6, 2015 at 10:30
  • do you know how I can combine the polygons resulting from the r.to.vect iterations into one layer with multiple polygons (mostly overlapping)? Now I get a load of different layers. If I could get one layer with polygons that have an attribute elev which contains $e as a value, that would be great. Commented Jul 8, 2015 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.