TerrainSampling

Tile-grid math the height grid samples through.

Types

Link copied to clipboard
data class TilePixel(val x: Int, val y: Int, val px: Double, val py: Double)

A coordinate located within a tile grid: the tile indices plus the sample-centered pixel position inside it.

Properties

Link copied to clipboard
const val TILE_SIZE: Int = 256

Functions

Link copied to clipboard
Link copied to clipboard
fun metersPerSample(z: Int, y: Int, size: Int): Double

Ground meters between samples of a tile at the given zoom and row.

Link copied to clipboard
fun sample(tile: ElevationTile, px: Double, py: Double): Float

Bilinear elevation at a sample-centered pixel position, edge-clamped.

Link copied to clipboard
fun tilePixel(latitude: Double, longitude: Double, z: Int, size: Int): TerrainSampling.TilePixel