Create terrain from AW3D Standard

I received sample data from AW3D at 5m resolution (5m DSM Level-1, 5m DSM Level-2, 5m DTM) and also at 2.5m resolution.

The 5m DSM Level-1 comes as two TIFF files. ImageMagick tells me:

$ identify *.tif
N32377E130545_N32165E130758_LT_DSM_5m_EL.tif TIFF 5101x5101 5101x5101+0+0 16-bit Grayscale Gray 49.709MiB 0.010u 0:00.004
N32377E130545_N32165E130758_LT_MSK_5m.tif TIFF 5101x5101 5101x5101+0+0 16-bit Grayscale Gray 49.709MiB 0.000u 0:00.004

How do I convert these into terrain?

I have used Gismo successfully to create terrain. It downloads terrain data via Opentopography. But I have not found an option to specify my own files. The description of at least one Gismo component mentions that terrain can be created with Ladybug. I have installed Ladybug, but again I’m lost.

Hi @feklee

You can use the import topo from Heron. You have to download it from the package manager.

Hi @feklee
Indeed Gismo does not have component to load custom terrain files. It can generate automatically a terrain for defined location/address and radius.
The functionality to open a terrain file is actually possible via Gismo’s “Terrain Generator” component’s source code. But I still haven’t exposed it as a new Gismo component.

The mentioned Ladybug component which also creates terrain based on location is Ladybug “Terrain Generator” from here, made by @AntonelloDN.

Thanks for clarifying!

Thank you! Finally I found the time to play with Heron. It took me a while to figure it out:


2026-02-13+08_dsm.3dm (76.4 KB)
2026-02-13+08_dsm.gh (7.4 KB)
2026-02-13+08_dsm.tif.zip (1.8 KB)

I processed the sample tile 2026-02-13+08_dsm.tif from JAXA’s ALOS Global Digital Surface Model (terms of use):

  1. I registered an account by following the instruction on the AW3D30 page.

  2. I downloaded a tile covering the area from 20°N 110°E to 25°N 115°E: N020E110_N025E115

    This is near Xingping, China. In this area are the mountains found on the 20 Yuan bank note. Unfortunately, the data in that region is not very good. Various of the more interesting mountain tops are missing. They might be too steep to be scanned by the ALOS satellite imaging system. Anyhow, some of the data inside the tile is usable. And this is just for purpose of demonstrating the process anyhow.

  3. I extracted the tile. Of the sub-tiles contained within, I picked ALPSMLC30_N024E110_DSM.tif for processing.

  4. First it needed to be converted from degrees to UTM coordinates (meters). I used GDAL:

    > gdalwarp -t_srs EPSG:32652 ALPSMLC30_N024E110_DSM.tif utm.tif
    
  5. I checked the extents in meters:

    > gdalinfo utm.tif
    […]
    Upper Left  (-1456568.741, 2904338.757) (109d50'47.27"E, 24d58'46.36"N)
    Lower Left  (-1456568.741, 2775207.909) (110d 1' 7.01"E, 23d52'39.17"N)
    Upper Right (-1335814.613, 2904338.757) (110d58'51.22"E, 25d 7'36.39"N)
    Lower Right (-1335814.613, 2775207.909) (111d 8'39.35"E, 24d 1' 2.86"N)
    Center      (-1396191.677, 2839773.333) (110d29'51.78"E, 24d30' 5.21"N)
    […]
    
  6. I did a crop of a 1000×1000 m area in the center:

    > gdal_translate -projwin -1396692 2840273 -1395692 2839273 -of GTiff utm.tif 2026-02-13+08_dsm.tif
    

    I used these coordinates also as boundary in Heron. Note that the lower right y-coordinate is larger than the upper left y-coordinate.

    The resulting image 2026-02-13+08_dsm.tif has a resolution of 33×33 pixels. This matches the advertised 30 meters resolution of the satellite data.

Why cropping? Otherwise, Heron may ask for petabytes of RAM and crash my system. To browse tiles without cropping, a good tool is QGIS.

Hi @feklee ,

Take a look at the attached definition.

20260213_AW3D Test.gh (34.1 KB)

Heron can use the EPSG:32652 coordinate system by setting it with the HeronSRS component. In this case, I’ve set Rhino’s EarthAnchorPoint to be the origin of EPSG:32652 so that your cropping rectangle works with the coordinates you provided, but the results will be very far from the origin, which can cause some floating point errors if you want to do more with the mesh later. I’d recommend setting the EAP to the center of your area of interest and can show you how to do this if you’d like.

The definition takes the DSMs from the folder you provided and warps them to vrt files (small reference files to the originals set to the given coordinate system) using Heron’s GdalWarp component, a wrapper for the GDAL Warp command line. Once you have this list of vrt files, the ImportTopo component can combine them into one dataset and crop it down with the given boundary. GDAL is good at handling all this data without loading them all into memory.

This methodology allows you to reference and crop all the DSM files at once with very little overhead and to use an arbitrary cropping boundary that crosses over tiles.

Given the desire to use tiled datasets here, the GdalMerge or GdalBuildVrt capabilities of Gdal would come in handy. I can look into adding them to Heron’s components.

-Brian

Thank you very much for the explanation, what a great tool Heron is!

Find my attempt below. Please correct me, if this is not ideal.


2026-02-19+08_dsm.gh (31.0 KB)
2026-02-19+08_dsm.3dm (40.8 KB)

Thank you, but this is not urgent. At the moment, I am just playing around, though I might use it for a project in the future.

Note that I had some issues with stability, or I did something wrong. For part of the day, ImportTopo just didn’t want to work. It always reported an out of bounds error. ITL had no issues. Perhaps there is some race condition with SetEAP, because later – after a restart of my system – it worked again. In all cases, I had the Rhino file set to meters.