Skip to content

BUILD_XYZ_TILES ​

Generates a slippy-map XYZ tile tree from a GeoTIFF raster. The input is assigned EPSG:3857 (Web Mercator) as its CRS, then passed to gdal2tiles.py which produces a directory of PNG tiles organized as {z}/{x}/{y}.png at zoom levels 1–19.

The tile directory is uploaded to MinIO as a flat recursive copy, making it directly servable by any static tile server or object-storage tile endpoint.

Typical use: serving 2D raster outputs (hillshades, color-relief maps, colored DSMs) as slippy-map tile layers in web mapping clients such as Leaflet, MapLibre GL, or OpenLayers.


Contract ​

TypeBUILD_XYZ_TILES
Acceptsinput_tif: tif
Producesoutput_tiles: xyz_tiles
Paramsnone

Inputs ​

SlotTypeDescription
input_tiftifSource GeoTIFF raster — typically the output of BUILD_HILLSHADE_DSM, BUILD_COLORED_DSM, or BUILD_COLORED_HILLSHADE_DSM

Outputs ​

SlotTypeDescription
output_tilesxyz_tilesXYZ tile directory uploaded to MinIO — {z}/{x}/{y}.png structure, zoom levels 1–19

Delivered as: a folder. Its contents land directly under {path} as {path}/{z}/{x}/{y}.png, and the intermediate tiles/ name is dropped. {path} is the directory declared in the job's outputs (delivered names).


What it does internally ​

  1. Downloads the input TIF from MinIO
  2. Runs gdal_translate -a_srs EPSG:3857 -of GTiff to assign EPSG:3857 (Web Mercator) as the explicit CRS — producing reprojected.tif
  3. Runs gdal2tiles.py -z 1-19 --xyz -r bilinear on reprojected.tif, generating a PNG tile tree under tiles/
  4. Uploads the entire tiles/ directory to MinIO recursively
  5. Runs gdalinfo -json on reprojected.tif to capture raster metadata into the artifact record
  6. Hashes all tile files with md5sum and includes the aggregate hash in the returned artifact descriptor

Recipe usage ​

json
{
  "id": "build_xyz_tiles",
  "type": "BUILD_XYZ_TILES",
  "inputs":  { "input_tif": "step:build_colored_dsm.colored_dsm_tif" },
  "outputs": { "output_tiles": "step:build_xyz_tiles.output_tiles" }
}

A typical two-step pattern — generate a color-relief raster, then tile it:

json
"recipe": [
  {
    "id": "build_colored_dsm",
    "type": "BUILD_COLORED_DSM",
    "inputs":  { "input_las": "job:input_las" },
    "outputs": { "colored_dsm_tif": "step:build_colored_dsm.colored_dsm_tif" }
  },
  {
    "id": "build_xyz_tiles",
    "type": "BUILD_XYZ_TILES",
    "inputs":  { "input_tif": "step:build_colored_dsm.colored_dsm_tif" },
    "outputs": { "output_tiles": "step:build_xyz_tiles.output_tiles" }
  }
]

Artifact storage path ​

text
artifacts/job_{id}/build_xyz_tiles/tiles/

The tiles directory is uploaded recursively. Individual tiles are reachable at:

text
artifacts/job_{id}/build_xyz_tiles/tiles/{z}/{x}/{y}.png

  • BUILD_HILLSHADE_DSM — produces a hillshade GeoTIFF; common upstream input for BUILD_XYZ_TILES
  • BUILD_COLORED_DSM — produces a color-relief GeoTIFF; common upstream input for BUILD_XYZ_TILES
  • BUILD_COLORED_HILLSHADE_DSM — produces a colored shaded-relief GeoTIFF; common upstream input for BUILD_XYZ_TILES
  • BUILD_CONTOURS — also produces web-ready tiles, but as vector data from a point cloud rather than a raster