salem.GoogleVisibleMap

class salem.GoogleVisibleMap(x, y, crs=<Other Coordinate Operation Transformer: longlat> Description: PROJ-based coordinate operation Area of Use: - undefined, size_x=640, size_y=640, scale=1, maptype='satellite', use_cache=True, key=None, **kwargs)[source]

Google static map automatically sized and zoomed to a selected region.

It’s usually more practical to use than GoogleCenterMap.

See https://developers.google.com/maps/documentation/maps-static/get-api-key for pricing.

__init__(x, y, crs=<Other Coordinate Operation Transformer: longlat> Description: PROJ-based coordinate operation Area of Use: - undefined, size_x=640, size_y=640, scale=1, maptype='satellite', use_cache=True, key=None, **kwargs)[source]

Initialize

Parameters:
xarray

x coordinates of the points to include on the map

yarray

y coordinates of the points to include on the map

crsproj or Grid

coordinate reference system of x, y

size_xint

image size

size_yint

image size

scaleint

image scaling factor. 1, 2. 2 is higher resolution but takes longer to download

maptypestr, default: ‘satellite’

‘roadmap’, ‘satellite’, ‘hybrid’, ‘terrain’

use_cachebool, default: True

store the downloaded image in the cache to avoid future downloads

keystr, default: None

Google API key. If None, it will try to read it from the environment variable STATIC_MAP_API_KEY

kwargs**

any keyword accepted by motionless.CenterMap

Notes

To obtain the exact domain specified in x and y you may have to play with the size_x and size_y kwargs.

Methods

__init__(x, y[, crs, size_x, size_y, scale, ...])

Initialize

get_vardata([var_id])

Return and subset the image.

set_period([t0, t1])

Set a period of interest for the dataset.

set_roi([shape, geometry, crs, grid, ...])

Set a region of interest for the dataset.

set_subset([corners, crs, toroi, margin])

Set a subset for the dataset.

Attributes

roi

Mask of the ROI (same size as subset).

time

Time array