aws.osml.image_processing.map_tileset_wmq module

class aws.osml.image_processing.map_tileset_wmq.WebMercatorQuadMapTileSet(tile_size: int = 256, tile_matrix_set_id='WebMercatorQuad')[source]

Bases: MapTileSet

Tile matrix set definition for WebMercatorQuad, expressed in http://www.opengis.net/def/crs/EPSG/0/3857 This tile matrix set is the most used tile matrix set in the mass market.(Google Maps, Microsoft Bing Maps, and Open Street Map tiles all use this projection). Note that this class should not be imported / used directly; it is an implementation detail of the abstract MapTileSet class. The correct way to utilize this class is to get an implementation from the MapTileSetFactory using a value from the WellKnownTileSet enumeration.

It has been long criticized because it is a based on a spherical Mercator instead of an ellipsoid. The use of WebMercatorQuad should be limited to visualization. Any additional use (including distance measurements, routing, etc.) needs to use the Mercator spherical expressions to transform the coordinate to an appropriate CRS first. The risks caused by imprecision in the use of Web Mercator have been noted by the US National Geospatial-Intelligence Agency (NGA). NGA has issued an Advisory Notice on web Mercator noting its risks and limiting approved usage to visualizations: https://nsgreg.nga.mil/doc/view?i=4478

property tile_matrix_set_id: str

Get the identifier for this map tile set. This is the tile matrix set ID in the OGC definitions.

Returns:

the tile matrix set ID

get_tile(tile_id: TildId) MapTile[source]

Get a description of the tile identified by a specific map tile ID.

Parameters:

tile_id – the tile ID

Returns:

the tile description

get_tile_for_location(world_coordinate: GeodeticWorldCoordinate, tile_matrix: int) MapTile[source]

Get a description of the tile containing a specific world location.

Parameters:
  • world_coordinate – the location in the world

  • tile_matrix – the tile_matrix or zoom level of interest

Returns:

the tile description