GeoTiffGeoReference

Maps between a GeoTIFF's raster grid and geodetic coordinates.

Raster space is continuous with integers on pixel corners: (0.0, 0.0) is the north-west corner of the first pixel and (0.5, 0.5) its centre. That matches how the engine addresses tile texels (see AbstractTiledElevationCoverage.fetchTileBlock), so the resampler can treat both grids the same way.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

True when the raster is axis-aligned in model space (the usual case) — lets callers skip the general path when a straight scale + offset is all that is needed.

Link copied to clipboard

Model-space size of one pixel along the raster's x and y axes.

Link copied to clipboard

Functions

Link copied to clipboard
fun geodeticToRaster(latitude: Double, longitude: Double, result: DoubleArray): Boolean

Convert geodetic degrees to a continuous raster coordinate, writing [x, y] into result. Returns false when the point can't be projected into model space.

Link copied to clipboard

Convert a continuous raster coordinate to geodetic degrees, writing [latitude, longitude] into result. Returns false when the projection rejects the point (outside its valid domain).

Link copied to clipboard
fun sector(width: Int, height: Int): Sector

Geographic bounds of a width × height raster. The outline is walked rather than just the four corners — a projected raster's edges bow, so corner-only bounds would clip the data along the middle of each side.