cartopy.io.img_tiles.GoogleWTS#
- class cartopy.io.img_tiles.GoogleWTS(desired_tile_form='RGB', user_agent='CartoPy/0.24.1', cache=False)[source]#
Implement web tile retrieval using the Google WTS coordinate system.
A “tile” in this class refers to the coordinates (x, y, z).
The tiles can be saved to a cache directory using the cache parameter, so they are downloaded only once. If it is set to True, the default path stored in the cartopy.config dictionary is used. If it is set to a custom path, this path is used instead of the default one. If it is set to False (the default behavior), the tiles are downloaded each time.
- find_images(target_domain, target_z, start_tile=(0, 0, 0))#
Target domain is a shapely polygon in native coordinates.
- tile_bbox(x, y, z, y0_at_north_pole=True)[source]#
Return the
(x0, x1), (y0, y1)
bounding box for the given x, y, z tile position.- Parameters:
x – The x tile coordinate in the Google tile numbering system.
y – The y tile coordinate in the Google tile numbering system.
z – The z tile coordinate in the Google tile numbering system.
y0_at_north_pole (optional) – Boolean representing whether the numbering of the y coordinate starts at the north pole (as is the convention for Google tiles) or not (in which case it will start at the south pole, as is the convention for TMS). Defaults to True.