Tag Archives: Landscape Model

SRTM Data – Take 2

Although my previous attempts [1, 2] at transforming the Space Shuttle SRTM data into a 3D landscape model worked fine the whole process was a little cumbersome. I decided to have another shot with a couple of improvements in mind:

  1. The version of SAGA GIS that is available from the Ubuntu repositories is several years out of date. It would be useful to bring this up to the latest version, or find an alternative if this wasn’t possible.
  2. I really wanted a better way of loading map images from Open Street Map or one of its derivatives. OpenTopoMap in particular would work well for landscape models.

As a subject I picked the area around Ramsau / Schladming in Austria as I knew that would give some dramatic scenery. The final result is below and this actually uses a Google Maps hybrid overlay. Details of the process can be found further down the page.

Elevation data courtesy of the U.S. Geological Survey / Map data © 2019 Google

Geographic Information System ( GIS )

SAGA GIS ( Part 1 )

The version of SAGA GIS that’s available from the Ubuntu repositories is 2.3.1. According to the SAGA GIS repository on SourceForge this dates from 2016 with the latest version being 7.2. I had hoped that there would be a Personal Package Archive available somewhere but the only one that I found was still a few versions out of date.

The alternative would be to build from source but I didn’t want to go down that route just yet …

QGIS

Another popular open source GIS for Linux is QGIS. It seems to have a popular following and there are plenty of tutorials and help available. My original reason for picking SAGA GIS was that it had the best tool for fixing holes in the input but as this wasn’t needed with the SRTM data then maybe it was time to give QGIS a try.

Installation was straightforward with detailed instructions available for Ubuntu systems. Its general operation was also easy and I quickly imported the previous set of SRTM and Landsat data. But when I tried to export the 3D data in the Esri grid format that the original LiDAR data used ( and that my processing tools expect ) then I hit some problems:

Firstly for some reason QGIS decided that the data didn’t have square pixels and so the GDAL utility that it uses to create the Esri grid file creates a slightly different output which I think is not part of the standard and certainly breaks my software. The reason, and possible fix, can be found in the GDAL documentation:

From https://www.gdal.org/frmt_various.html#AAIGrid

If pixels being written are not square (the width and height of a pixel in georeferenced units differ) then DX and DY parameters will be output instead of CELLSIZE. Such files can be used in Golden Surfer, but not most other ascii grid reading programs. For force the X pixel size to be used as CELLSIZE use the FORCE_CELLSIZE=YES creation option or resample the input to have square pixels.

Unfortunately the QGIS dialog for this tool doesn’t have an option to set the FORCE_CELLSIZE flag. Even worse although earlier versions of QGIS allowed the user to manually edit the GDAL command this option has been removed from version 3 and is not likely to be reinstated. 😦

It was possible to cut & paste the command to a terminal window, make the necessary edits and create an output grid in the correct format. However the final 3D model seemed to have a very strange shape. Before going down that particular rabbit hole I decided to give SAGA GIS another go …

SAGA GIS ( Part 2 )

I’m normally wary of building from source any programs that have a large graphical component. However the instructions on SourceForge seemed to be straightforward and I found a blog post that confirmed this so I downloaded the source and set it going.

To my slight amazement it worked perfectly first time 🙂 At this point I was a bit annoyed at spending all that time on QGIS but I now have the latest version of SAGA GIS up and running.

Map Overlay

I felt sure that there was an easier way of importing map overlays and after a bit of searching online I came across the documentation for Module Import Open Street Map Image which seemed to do exactly what I wanted. It’s pretty buried in the menu options and not labelled that clearly so you’re not going to stumble on it by accident and I couldn’t find any reference to it the documentation.

For the record it’s under “Tools > Import/Export > GDAL/OGR > Import TMS Image” and the dialog ( left ) gives a number of enticing options including Google Maps.

The “user defined” option is also quite useful, especially for maps derived from Open Street Map. There’s a list of these available and most of them use a similar server URL format to Open Street Map. OpenTopoMap tiles can certainly be downloaded using the same format URL but from a different server.

One point to note is that there may be varying licencing and usage restriction on downloading from these different servers. While the Open Street Map data is a Creative Commons licence there are restrictions on downloading that data. Google has slightly different licencing conditions.

For the Ramsau model I chose the Google Hybrid overlay as it showed roads and ski tracks as well as the satellite imagery. The vertical scale has been exaggerated by 2x otherwise everything else is unchanged.

Further Work

Overall these investigations have given me some very worthwhile process improvements for creating 3D landscape models. The only thing that’s remaining is that I’m not 100% sure that the downloaded maps are at the correct zoom factor. I think that it should be possible to get better resolution overlays, the map servers certainly allow the zoom level to be entered as part of the tile download URL. However I haven’t yet found how to set this parameter in SAGA GIS.

LiDAR 3D Print – Part 2

After the initial successful test I decided to print some more of the LiDAR squares with a view to making some sort of artwork. The LiDAR data can be a bit patchy but I found 8 squares in the Brecon Beacons that would do the trick. I’ve been on many walks round this area and I knew that it would provide plenty of interest.

Printing the Tiles

I downloaded and processed the data as described in the previous post. The 3D printing was very straightforward and I soon had eight tiles ready to be mounted. The bottom of the tiles, which were the first layers to be printed stuck out slightly which meant that the tiles didn’t quite stack up tightly enough. I tried sanding the ridges but the plastic is quite hard and it just created a mess. I then tried a flush cutting bit on the router table which was better but I eventually ended up using a round over bit which took off just enough material. I was concerned that the plastic would be too brittle for the router but it worked OK.

Frame

I thought of trying to find an off the shelf frame but the size of the tiles didn’t fit any of the standard sizes. I also wanted quite a deep frame to accommodate the height of the 3D prints which made it doubly difficult to find something. Inevitably I ended up making a custom frame from scrap bits of wood:

A quick lick of paint and it was assembly time …

Final Product

I marked the positions of the tiles on the inside of the frame and then attached them with some double sided sticky pads.

I was quite pleased with the final result. The lighting is quite critical so that the shadows show up the relief of the landscape but I think that it’s enough of a conversation piece to go on the wall.