Skip to content

Documentation / @interstellar-tools/maps / GeoTransformInterface

Interface: GeoTransformInterface ​

Defined in: terrain/geotransform.ts:22

Where a grid lies on a map: the affine transform from its rows and columns to a projection's map coordinates, as a GeoTIFF's or GDAL's geotransform gives it.

x=x0+cΔx,y=y0−rΔy

Where r and c are the row and column, (x0,y0) is the origin and Δx,Δy the cellSize.

  • The map is the one a projection draws, such as mercator or equirectangular: its inverse, such as inverseMercator, takes a map position on to latitude and longitude.
  • The cellSize here is on the map, which isn't always the grid's own cellSize, on the ground. For a Web Mercator tile the map's cells are 1/cos⁡φ larger; for a grid in a projection true to scale over it, such as UTM, they are the same.

Properties ​

cellSize ​

ts
cellSize: {
  x: number;
  y: number;
}

Defined in: terrain/geotransform.ts:26

Size of a cell on the map in m, east–west (x) and north–south (y) (finite, > 0).

NameTypeDefined in
xnumberterrain/geotransform.ts:26
ynumberterrain/geotransform.ts:26

origin ​

ts
origin: ProjectedPointInterface;

Defined in: terrain/geotransform.ts:24

Map position of the centre of the north-west cell, row 0 and column 0, in m (finite). GDAL's geotransform gives the cell's corner: add half a cell.