Script example
Download a place once, then export it with several surface graphs.
This script downloads Emerald Bay on Lake Tahoe once, then exports one GLB for each surface graph. Steps whose file already exists are skipped, so you can run it again after adding a graph.
#!/bin/zsh
# Emerald Bay (Lake Tahoe, USA, NAIP): bay, island and forest.
N=emerald_bay
[ -z "$OPENTOPOGRAPHY_API_KEY" ] && { echo "OPENTOPOGRAPHY_API_KEY is not set"; exit 1; }
mkdir -p $N
# Download once, with 60 cm imagery and a 10 m mesh.
[ -f $N/$N.land ] || landmeld-cli --imagery-pixel-m 0.6 --texel-m 0.6 \
--center-lon -120.1050 --center-lat 38.9545 --width-m 4000 --height-m 3500 \
--mesh-spacing-m 10 --height-sampling bicubic \
--map water,land,land_use,buildings,transportation \
--output $N/$N.land || exit 1
# One GLB per surface graph, with no network.
for look in real winter autumn; do
[ -f $N/${N}_$look.glb ] || landmeld-cli --open $N/$N.land --surface graphs/$look.json \
--output $N/${N}_$look.glb
done
The graphs/ folder holds the surface graphs as JSON. The graph names here are examples.