Table of Contents

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 MvtTileTransform

Inheritance

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

grid TileGrid

The tile grid.

level int

The level.

row long

The row.

column long

The column.

extent uint

The number of tile units per tile edge; default 4096.

Exceptions

ArgumentNullException

grid is null.

ArgumentOutOfRangeException

level is not a level of the grid, or extent is 0.

MvtTileTransform(Envelope2D, uint)

Creates the transform for a tile envelope.

public MvtTileTransform(Envelope2D tileEnvelope, uint extent = 4096)

Parameters

tileEnvelope Envelope2D

The world envelope of the tile; must have an area.

extent uint

The number of tile units per tile edge; default 4096.

Exceptions

ArgumentOutOfRangeException

The envelope has no area or is not finite, or extent is 0.

Properties

Extent

The number of tile units per tile edge.

public uint Extent { get; }

Property Value

uint

TileEnvelope

The world envelope of the tile.

public Envelope2D TileEnvelope { get; }

Property Value

Envelope2D

UnitHeight

World units per tile unit in Y.

public double UnitHeight { get; }

Property Value

double

UnitWidth

World units per tile unit in X.

public double UnitWidth { get; }

Property Value

double

Methods

BufferedEnvelope(double)

The world envelope of the tile widened by buffer tile units on each side.

public Envelope2D BufferedEnvelope(double buffer)

Parameters

buffer double

The buffer in tile units, ≥ 0.

Returns

Envelope2D

Exceptions

ArgumentOutOfRangeException

buffer is negative or not finite.

ToTile(Coordinate)

Converts a world coordinate into (unrounded) tile coordinates.

public Coordinate ToTile(Coordinate world)

Parameters

world Coordinate

The world coordinate.

Returns

Coordinate

ToWorld(double, double)

Converts tile coordinates into a world coordinate.

public Coordinate ToWorld(double x, double y)

Parameters

x double

The tile X.

y double

The tile Y (down).

Returns

Coordinate