NDEVR
API Documentation
EPSG4326TileHelper

Provides coordinate conversion utilities between EPSG:4326 (WGS84) and tile coordinates. More...

Public Types

enum class  TileLocation {
  e_center , e_north_east , e_south_west , e_south_east ,
  e_north_west
}
 Specifies a position within a map tile. More...

Public Member Functions

fltp08 tile_x_to_EPSG4326_lon_deg (uint04 x, uint04 z, fltp08 percent_x, fltp08 scale_factor=1.0) const
 Converts a tile X coordinate to longitude using a fractional position.
fltp08 tile_x_to_EPSG4326_lon_deg (uint04 x, uint04 z, TileLocation location, fltp08 scale_factor=1.0) const
 Converts a tile X coordinate to longitude in degrees.
fltp08 tile_y_to_EPSG4326_lat_deg (uint04 y, uint04 z, fltp08 percent_y, fltp08 scale_factor=1.0) const
 Converts a tile Y coordinate to latitude using a fractional position.
fltp08 tile_y_to_EPSG4326_lat_deg (uint04 y, uint04 z, TileLocation location, fltp08 scale_factor=1.0) const
 Converts a tile Y coordinate to latitude in degrees.

Static Public Member Functions

static uint01 CalcZoom (Bounds< 2, fltp08 > lat_long_bounds_wgs84_dd, Vector< 2, uint04 > size)
 Calculates the optimal zoom level for a geographic bounds and pixel size.
static EPSG4326TileHelperDefaultHelper ()
 Returns the singleton helper instance.
static fltp08 EPSG4326 (uint01 dim, fltp08 lon_deg, uint01 z, fltp08 scale_factor=1.0)
 Converts a geographic coordinate to tile space.
static Bounds< 2, fltp08TileSpace (Bounds< 2, fltp08 > lat_long_bounds, Vector< 2, uint04 > size, fltp08 scale_factor=1.0)
 Computes the tile space bounds for a geographic bounding box.

Detailed Description

Provides coordinate conversion utilities between EPSG:4326 (WGS84) and tile coordinates.


Definition at line 163 of file WebMercatorTiledImageManager.h.

Member Enumeration Documentation

◆ TileLocation

Specifies a position within a map tile.

Enumerator
e_center 

Center of the tile.

e_north_east 

North-east corner.

e_south_west 

South-west corner.

e_south_east 

South-east corner.

e_north_west 

North-west corner.

Definition at line 167 of file WebMercatorTiledImageManager.h.

Member Function Documentation

◆ CalcZoom()

uint01 EPSG4326TileHelper::CalcZoom ( Bounds< 2, fltp08 > lat_long_bounds_wgs84_dd,
Vector< 2, uint04 > size )
static

Calculates the optimal zoom level for a geographic bounds and pixel size.

Parameters
[in]lat_long_bounds_wgs84_ddThe geographic bounds in WGS84 decimal degrees.
[in]sizeThe desired pixel dimensions.
Returns
The optimal zoom level.

◆ DefaultHelper()

EPSG4326TileHelper & EPSG4326TileHelper::DefaultHelper ( )
static

Returns the singleton helper instance.

Returns
A reference to the default EPSG4326TileHelper.

◆ EPSG4326()

fltp08 EPSG4326TileHelper::EPSG4326 ( uint01 dim,
fltp08 lon_deg,
uint01 z,
fltp08 scale_factor = 1.0 )
static

Converts a geographic coordinate to tile space.

Parameters
[in]dimThe dimension (0 = longitude, 1 = latitude).
[in]lon_degThe coordinate in degrees.
[in]zThe zoom level.
[in]scale_factorThe scale factor.
Returns
The tile-space coordinate.

◆ tile_x_to_EPSG4326_lon_deg() [1/2]

fltp08 EPSG4326TileHelper::tile_x_to_EPSG4326_lon_deg ( uint04 x,
uint04 z,
fltp08 percent_x,
fltp08 scale_factor = 1.0 ) const

Converts a tile X coordinate to longitude using a fractional position.

Parameters
[in]xThe tile X index.
[in]zThe zoom level.
[in]percent_xThe fractional position within the tile (0.0 to 1.0).
[in]scale_factorThe scale factor.
Returns
The longitude in degrees.

◆ tile_x_to_EPSG4326_lon_deg() [2/2]

fltp08 EPSG4326TileHelper::tile_x_to_EPSG4326_lon_deg ( uint04 x,
uint04 z,
TileLocation location,
fltp08 scale_factor = 1.0 ) const

Converts a tile X coordinate to longitude in degrees.

Parameters
[in]xThe tile X index.
[in]zThe zoom level.
[in]locationThe position within the tile.
[in]scale_factorThe scale factor.
Returns
The longitude in degrees.

◆ tile_y_to_EPSG4326_lat_deg() [1/2]

fltp08 EPSG4326TileHelper::tile_y_to_EPSG4326_lat_deg ( uint04 y,
uint04 z,
fltp08 percent_y,
fltp08 scale_factor = 1.0 ) const

Converts a tile Y coordinate to latitude using a fractional position.

Parameters
[in]yThe tile Y index.
[in]zThe zoom level.
[in]percent_yThe fractional position within the tile (0.0 to 1.0).
[in]scale_factorThe scale factor.
Returns
The latitude in degrees.

◆ tile_y_to_EPSG4326_lat_deg() [2/2]

fltp08 EPSG4326TileHelper::tile_y_to_EPSG4326_lat_deg ( uint04 y,
uint04 z,
TileLocation location,
fltp08 scale_factor = 1.0 ) const

Converts a tile Y coordinate to latitude in degrees.

Parameters
[in]yThe tile Y index.
[in]zThe zoom level.
[in]locationThe position within the tile.
[in]scale_factorThe scale factor.
Returns
The latitude in degrees.

◆ TileSpace()

Bounds< 2, fltp08 > EPSG4326TileHelper::TileSpace ( Bounds< 2, fltp08 > lat_long_bounds,
Vector< 2, uint04 > size,
fltp08 scale_factor = 1.0 )
static

Computes the tile space bounds for a geographic bounding box.

Parameters
[in]lat_long_boundsThe geographic bounds in degrees.
[in]sizeThe desired output size.
[in]scale_factorThe scale factor.
Returns
The tile-space bounding box.

The documentation for this class was generated from the following file: