CLI reference¶
satprint has two commands: satprint serve runs the web app and
satprint build builds a model.
satprint serve¶
satprint serve [--host 127.0.0.1] [--port 7417] [--reload]
| Option | Default | Meaning |
|---|---|---|
--host |
127.0.0.1 |
Address to listen on; 0.0.0.0 for every interface |
--port |
7417 |
Port to listen on |
--reload |
off | Restart when the code changes, for development |
satprint build¶
satprint build (--bbox S W N E | --file FILE | --synthetic) [options] -o model.stl
Bounds are SOUTH WEST NORTH EAST in decimal degrees. The command writes the
STL, prints a JSON summary (elevation range, scale, triangle count, volume and a
watertight check) and writes any extra files you ask for.
Source¶
| Option | Meaning |
|---|---|
--bbox S W N E |
Satellite elevation for this area |
--file FILE |
A PNG, TIFF or GeoTIFF heightmap, in meters |
--synthetic |
Procedural demo terrain, offline |
--ground-width M |
Real-world width in meters, for --file |
--seed N |
Seed for --synthetic |
Print settings¶
| Option | Default | Meaning |
|---|---|---|
--resolution N |
256 | Grid columns, 32 to 1024 |
--width MM |
100 | Model width |
--base MM |
3 | Base thickness |
--exaggeration X |
1.5 | Vertical exaggeration |
--relief MM |
Fixed relief height; overrides --exaggeration |
|
--smoothing PX |
0 | Gaussian smoothing, in grid pixels |
--keep-bathymetry |
off | Keep below-sea-level data instead of flattening it |
--frame MM |
0 | Border frame width around the model; 0 for none |
--frame-height MM |
base + 1 | Frame height |
--name NAME |
terrain |
Model name, stored in the files |
Buildings¶
These need --bbox.
| Option | Default | Meaning |
|---|---|---|
--buildings |
off | Add OpenStreetMap buildings |
--building-scale X |
1 | Building height multiplier; 1 is true proportion |
--building-source |
openfreemap |
openfreemap (fast, rebuilt weekly), overpass (latest edits, slower) or overture (OSM plus Microsoft and Google footprints; needs the overture extra) |
Bridges¶
These need --bbox and the same area limit as buildings, and work with or
without --buildings.
| Option | Default | Meaning |
|---|---|---|
--bridges |
off | Add OpenStreetMap bridges over water as raised decks |
--bridge-piers MM |
20 | Longest distance between piers along a bridge; 0 for none |
The build reports the number of bridges as bridges.
Roads¶
These need --bbox and the same area limit as buildings, and work with or
without --buildings. With buildings on, roads stop at the building
footprints.
| Option | Default | Meaning |
|---|---|---|
--roads |
off | Add OpenStreetMap roads as raised strips on the terrain |
--road-detail |
auto |
auto (classes by model scale), major (motorway to secondary) or all |
The build reports the number of connected road networks as roads.
Output¶
| Option | Meaning |
|---|---|
-o, --output FILE |
The STL, terrain.stl by default |
--3mf FILE |
Also write the multi-color 3MF; needs --bbox |
--glb FILE |
Also write the textured GLB; needs --bbox |
--preview FILE |
Also write a hillshade PNG |
Examples¶
# Matterhorn, 120 mm wide, 2x exaggeration
satprint build --bbox 45.93 7.58 46.02 7.72 --width 120 --exaggeration 2 -o matterhorn.stl
# Fixed 15 mm relief, smoothed, with a hillshade preview PNG
satprint build --bbox 36.02 -112.25 36.20 -111.95 --relief 15 --smoothing 1 \
--preview canyon.png -o grand-canyon.stl
# Midtown Manhattan with buildings, plus a textured GLB
satprint build --bbox 40.7414 -73.9997 40.7684 -73.9683 --width 150 \
--buildings --glb midtown.glb -o midtown.stl
# The Golden Gate Bridge, with piers at most 20 mm apart
satprint build --bbox 37.805 -122.490 37.835 -122.465 --bridges -o golden-gate.stl
# San Francisco with buildings and roads, roads as their own 3MF part
satprint build --bbox 37.745 -122.45 37.775 -122.41 --width 150 --buildings \
--roads --3mf sf.3mf -o sf.stl
# Venice as a four-color 3MF: land, water, buildings and a 5 mm border frame
satprint build --bbox 45.43 12.32 45.446 12.343 --buildings --frame 5 \
--3mf venice.3mf -o venice.stl
# From your own DEM in meters, 12 km across
satprint build --file dem.tif --ground-width 12000 -o dem.stl