Skip to content

Demo: WSF-3D Italy

The World Settlement Footprint 3D (WSF-3D) layer over Italy, 178 335 × 200 599 float64 pixels of building height, as the GeoZarr pyramid this pipeline writes (chunk 256, shard 4096, mean, nodata 0, ten levels), served straight from the public bucket by a TiTiler with a GeoZarr reader. Every tile you see is cut on request from the pyramid level that matches the zoom: no tile cache, no pre-rendering.

What is on the map

  • Colour is the mean building height of the pixel at the level shown, 0 to 30 m on the inferno colormap. The value 0 means no building and is drawn transparent: the store's fill value is NaN, so the tile server would paint zeros as the darkest colour; the page sends a colormap whose entry for 0 has zero alpha instead (the router's nodata parameter has no effect on this reader, and band-math expressions are not accepted on it).
  • Zoom 5 to 14 are served from levels 9 down to 0 of the pyramid, 0.046° down to the native 0.0000898°: the page names the level as 14 - zoom, since level L has 2**L native pixels per pixel and the native pixel matches zoom 14. Beyond 14 the browser upsamples the native tiles.
  • A click reads the native pixel through the point endpoint.
  • The basemap is Esri's World Dark Gray canvas, which needs no key.

Behind the tiles

The store is s3://me-public-assets/terrazarr/demo/WSF3Dv3_Italy.zarr, written by:

terrazarr --input s3://me-public-assets/terrazarr/inputs/WSF3Dv3_Italy_full.zarr \
  --output WSF3Dv3_Italy.zarr \
  --chunk-size 256 --shard-size 4096 --sharding --method mean --nodata 0 \
  --workers 8 --threads-per-worker 1 --memory-limit 4GB --compressor zstd --clevel 3

six minutes on 8 processes, 2178 objects, 2.6 GB. The tile server is titiler with a GeoZarr reader (/geozarr/): a level is named as {level}:{variable}, and the reader cuts the tile from that level's shard-aligned chunks on S3, about 0.4 s per tile at every zoom. Asked for the root variable instead (/:data) it reads the native array for any zoom and refuses tiles wider than a billion pixels, so a client picks the level, as this page does. The same store answers:

  • GET {titiler}/geozarr/tiles/WebMercatorQuad/{z}/{x}/{y}.png?url={store}&variables={14-z}:data&rescale=0,30&colormap={json}&colormap_type=linear
  • GET {titiler}/geozarr/point/{lon},{lat}?url={store}&variables=0:data
  • GET {titiler}/geozarr/info?url={store}&variables=9:data

The data is the World Settlement Footprint 3D (DLR), CC BY 4.0; inputs and the pyramid are in the public bucket described in benchmarks.