View on GitHub

leaflet-city-mapper

A small 3D rendering engine for leaflet

Cloud Optimized GeoTIFF

Source guide Project README

Reads supported GeoTIFF metadata and byte ranges and decodes color or elevation tiles from COG sources. The same source can be used by raster and terrain paths.

Adapting a COG to tiles

flowchart LR
  File["COG / PMTiles asset"] --> Open["Read TIFF directories"]
  Open --> Adapter["Archive-compatible header + XYZ"]
  Adapter --> Overview["Select zoom overview"]
  Overview --> Color["Color blocks → image"]
  Overview --> DEM["Elevation blocks → data"]
  Color --> Raster["Raster"]
  DEM --> Terrain["Terrain"]

Supports classic TIFF in EPSG:3857, not BigTIFF; requests outside coverage return no tile. Raster initialization uses a worker-backed adapter.

Related: archives, terrain, workers.