mapshader.mercator.MercatorTileDefinition#
- class mapshader.mercator.MercatorTileDefinition(x_range, y_range, tile_size=256, min_zoom=0, max_zoom=30, x_origin_offset=20037508.34, y_origin_offset=20037508.34, initial_resolution=156543.03392804097)[source]#
Implementation of mercator tile source. In general, tile sources are used as a required input for
TileRenderer
.- Parameters:
x_range (tuple) – Full extent of x dimension in data units.
y_range (tuple) – Full extent of y dimension in data units.
min_zoom (int) – A minimum zoom level for the tile layer. This is the most zoomed-out level.
max_zoom (int) – A maximum zoom level for the tile layer. This is the most zoomed-in level.
x_origin_offset (int) – An x-offset in plot coordinates.
y_origin_offset (int) – An y-offset in plot coordinates.
initial_resolution (int) – Resolution (plot_units / pixels) of minimum zoom level of tileset projection. None to auto-compute.
format (int) – An y-offset in plot coordinates.
- Returns:
tileScheme
- Return type:
- __init__(x_range, y_range, tile_size=256, min_zoom=0, max_zoom=30, x_origin_offset=20037508.34, y_origin_offset=20037508.34, initial_resolution=156543.03392804097)[source]#
Methods
__init__
(x_range, y_range[, tile_size, ...])get_level_by_extent
(extent, height, width)get_resolution_by_extent
(extent, height, width)get_tile_meters
(tx, ty, level)get_tiles_by_extent
(extent, level)is_valid_tile
(x, y, z)meters_to_pixels
(mx, my, level)meters_to_tile
(mx, my, level)pixels_to_meters
(px, py, level)pixels_to_raster
(px, py, level)pixels_to_tile
(px, py, level)to_esri_tile_metadata
(output_file_path)Create ESRI tile metadata JSON
to_ogc_tile_metadata
(output_file_path)Create OGC tile metadata XML