Class: WebMercatorTilePyramid

WebMercatorTilePyramid

A TilePyramid implementation, the equivalent of WebMercatorTilePyramid in tile-service/binning-utilities.

new WebMercatorTilePyramid()

Instantiate a WebMercatorTilePyramid object.

Methods

fractionalTileToRoot(tile){Object}

Maps a fractional tile coordinate to a point in the root coordinate system.
Name Type Description
tile Object The fractional tile coordinate.
Returns:
root coordinate.

getBinBounds(tile, bin){Object}

Returns the bounds of a particular bin in the root coordinate system.
Name Type Description
tile Object The tile coordinate.
bin Object The bin coordinate.
Returns:
bounds object.

getEPSG900913Bounds(tile, bin){Object}

Returns the bounds of a particular tile in EPSG 900913 meter units.
Name Type Description
tile Object The tile coordinate.
bin Object The bin coordinate.
Returns:
bounds object.

getProjection(){string}

Returns the projection code associated with the pyramid.
Returns:
projection code.

getTileBounds(tile){Object}

Returns the bounds of a particular tile in the root coordinate system.
Name Type Description
tile Object The tile coordinate.
Returns:
bounds object.

getTileScheme(){string}

Returns the tile scheme associated with the pyramid.
Returns:
scheme code.

rootToBin(lon, lat, tile){Object}

Maps a point from the root coordinate system to a specific bin coordinate.
Name Type Description
lon number The longitude coordinate value.
lat number The latitude coordinate value.
tile Object The tile coordinate that holds the target bin.
Returns:
bin coordinate.

rootToFractionalBin(lon, lat, tile){Object}

Maps a point from the root coordinate system to a specific fractional bin coordinate.
Name Type Description
lon number The longitude coordinate value.
lat number The latitude coordinate value.
tile Object The tile coordinate that holds the target bin.
Returns:
bin coordinate.

rootToFractionalTile(lon, lat, level, bins){Object}

Maps a point from the root coordinate system to a fractional tile coordinate.
Name Type Description
lon number The longitude coordinate value.
lat number The latitude coordinate value.
level integer The zoom level.
bins integer The number of bins per dimension in a tile.
Returns:
fractional tile coordinate.

rootToTile(lon, lat, level, bins){Object}

Maps a point from the root coordinate system to a tile coordinate.
Name Type Description
lon number The longitude coordinate value.
lat number The latitude coordinate value.
level integer The zoom level.
bins integer The number of bins per dimension in a tile.
Returns:
tile coordinate.
Returns the JSON representation of this tile pyramid as a string.
Returns:
bounds object.