Class MvtTileTransform
- Namespace
- SpatialNET.IO
- Assembly
- SpatialNET.IO.dll
The affine mapping between the world coordinates of one tile and its tile coordinates (0..extent, y down), for any grid.
X maps [MinX, MaxX] to [0, extent], Y maps [MaxY, MinY] to [0, extent]; for non-square tiles both
axes are scaled independently.
public sealed class MvtTileTransformInheritance
Inherited Members
Constructors
MvtTileTransform(TileGrid, int, long, long, uint)
Creates the transform for a tile of a grid.
public MvtTileTransform(TileGrid grid, int level, long row, long column, uint extent = 4096)Parameters
gridTileGrid-
The tile grid.
levelint-
The level.
rowlong-
The row.
columnlong-
The column.
extentuint-
The number of tile units per tile edge; default 4096.
Exceptions
- ArgumentNullException
-
gridisnull. - ArgumentOutOfRangeException
-
levelis not a level of the grid, orextentis 0.
MvtTileTransform(Envelope2D, uint)
Creates the transform for a tile envelope.
public MvtTileTransform(Envelope2D tileEnvelope, uint extent = 4096)Parameters
tileEnvelopeEnvelope2D-
The world envelope of the tile; must have an area.
extentuint-
The number of tile units per tile edge; default 4096.
Exceptions
- ArgumentOutOfRangeException
-
The envelope has no area or is not finite, or
extentis 0.
Properties
Extent
The number of tile units per tile edge.
public uint Extent { get; }Property Value
TileEnvelope
The world envelope of the tile.
public Envelope2D TileEnvelope { get; }Property Value
UnitHeight
World units per tile unit in Y.
public double UnitHeight { get; }Property Value
UnitWidth
World units per tile unit in X.
public double UnitWidth { get; }Property Value
Methods
BufferedEnvelope(double)
The world envelope of the tile widened by buffer tile units on each side.
public Envelope2D BufferedEnvelope(double buffer)Parameters
bufferdouble-
The buffer in tile units, ≥ 0.
Returns
Exceptions
- ArgumentOutOfRangeException
-
bufferis negative or not finite.
ToTile(Coordinate)
Converts a world coordinate into (unrounded) tile coordinates.
public Coordinate ToTile(Coordinate world)Parameters
worldCoordinate-
The world coordinate.
Returns
ToWorld(double, double)
Converts tile coordinates into a world coordinate.
public Coordinate ToWorld(double x, double y)