cartopy.io.img_tiles.OrdnanceSurvey#

class cartopy.io.img_tiles.OrdnanceSurvey(apikey, layer='Road', desired_tile_form='RGB', cache=False)[source]#

Implement web tile retrieval from Ordnance Survey map data. To use this tile image source you will need to obtain an API key from Ordnance Survey.

For more details on Ordnance Survey layer styles, see https://apidocs.os.uk/docs/map-styles.

For the API framework agreement, see https://developer.ordnancesurvey.co.uk/os-api-framework-agreement.

__init__(apikey, layer='Road', desired_tile_form='RGB', cache=False)[source]#
Parameters:
  • apikey (required) – The authentication key provided by OS to query the maps API

  • layer (optional) –

    The style of the Ordnance Survey map tiles. One of ‘Outdoor’, ‘Road’, ‘Light’, ‘Night’, ‘Leisure’. Defaults to ‘Road’. Details about the style of layer can be found at:

  • desired_tile_form (optional) – Defaults to ‘RGB’.

Methods

__init__(apikey[, layer, desired_tile_form, ...])

param apikey:

The authentication key provided by OS to query the maps API

find_images(target_domain, target_z[, ...])

Target domain is a shapely polygon in native coordinates.

get_image(tile)

image_for_domain(target_domain, target_z)

subtiles(x_y_z)

tile_bbox(x, y, z[, y0_at_north_pole])

Return the (x0, x1), (y0, y1) bounding box for the given x, y, z tile position.

tileextent(x_y_z)

Return extent tuple (x0,x1,y0,y1) in Mercator coordinates.