@landrush/martini-terrain-provider

Overview

On-the-fly meshing of raster elevation data for the CesiumJS virtual globe

This package contains a Cesium.TerrainProvider that uses right-triangular irregular networks (RTIN) pioneered by Mapbox's Martini to transform arbitrary Cloud-Optimized GeoTIFF (COG) rasters into quantized mesh terrain, for rendering in the CesiumJS digital globe.

This package relys on geotiff.js to read COG rasters, and geotiff-geokeys-to-proj4 plus proj4 to project the requested bounds - as a result, this package falls to the same limitations as those packages.

Getting Started

This package is still in its early stages and anything may change at any point

This package is listed on NPM as @landrush/martini-terrain-provider. It can be installed using the command:

npm install @landrush/martini-terrain-provider
import { Viewer, Terrain } from 'cesium'
import { MartiniTerrainProvider } from '@landrush/martini-terrain-provider'

const sources = ['url', new File()]
const provider = MartiniTerrainProvider.fromSources(sources, { ...options })

const viewer = new Viewer('cesiumContainer', {
terrain: new Terrain(provider),
})

If you'd like to contribute, follow the steps detailed in the repository QUICKSTART.

Additional Info

Contact Cameron of Hobu, Inc. for questions or comments relating to this project