xoa.core.plot.get_projection

Contents

xoa.core.plot.get_projection#

xoa.core.plot.get_projection(projection=None, extent=None)[source]#

Get a cartopy projection from its name or alias

Parameters:
  • projection (None, str, cartopy.crs.Projection) – A projection instance, which is returned as is, or the lower case name of a cartopy.crs projection class that has no mandatory parameter, like "mercator", "platecarree", "orthographic", "stereographic" or "lambertazimuthalequalarea". "webmercator" is the web Mercator projection cartopy.crs.Mercator.GOOGLE of the tiles of most web map services. The aliases "merc", "pc", "ortho" and "webmerc" are also accepted. The default is cartopy.crs.Mercator. The orthographic projection shows the Earth as seen from above a point, which limits the deformation of the cells of regional grids.

  • extent (None, list) – Extent [xmin, xmax, ymin, ymax] in degrees, whose center is used as the central_longitude and central_latitude of the projections that accept both, like the orthographic one.

Returns:

cartopy.crs.Projection