Skip to content

Tile.Tile

Gigas002 edited this page Jul 14, 2019 · 10 revisions

Class with static methods for calculating some tile stuff.

Namespace

GTiff2Tiles.Core.Tile

Methods

GetTileNumbersFromCoords

Description: Calculates the tile numbers for zoom which covers given lon/lat coordinates.

Syntax:

public static (int tileMinX, int tileMinY, int tileMaxX, int tileMaxY) GetTileNumbersFromCoords(double minX, double minY, double maxX, double maxY, int zoom, tmsCompatible)

Parameters:

Type Name Description
System.Double minX Minimum longitude
System.Double minY Minimum latitude
System.Double maxX Maximum longitude
System.Double maxY Maximum latitude
System.Int32 zoom Tile's zoom
System.Boolean tmsCompatible Do you want tms tiles on output?

Returns:

Type Name Description
System.Int32 tileMinX Minimum tile’s x number for current zoom
System.Int32 tileMinY Minimum tile’s y number for current zoom
System.Int32 tileMaxX Maximum tile’s x number for current zoom
System.Int32 tileMaxY Maximum tile’s y number for current zoom

Throws:

TileBounds

Description: Calculates tile's coordinate borders for passed tiles numbers and zoom.

Syntax:

public static (double minX, double minY, double maxX, double maxY) TileBounds(int tileX, int tileY, int zoom, bool tmsCompatible)

Parameters:

Type Name Description
System.Int32 tileX Tile’s x number
System.Int32 tileY Tile’s y number
System.Int32 zoom Tile’s zoom
System.Boolean tmsCompatible Do you want tms tiles on output?

Returns:

Type Name Description
System.Double minX Minimum longitude
System.Double minY Minimum latitude
System.Double maxX Maximum longitude
System.Double maxY Maximum latitude

Throws:

Clone this wiki locally