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.crsprojection class that has no mandatory parameter, like"mercator","platecarree","orthographic","stereographic"or"lambertazimuthalequalarea"."webmercator"is the web Mercator projectioncartopy.crs.Mercator.GOOGLEof the tiles of most web map services. The aliases"merc","pc","ortho"and"webmerc"are also accepted. The default iscartopy.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 thecentral_longitudeandcentral_latitudeof the projections that accept both, like the orthographic one.
- Returns:
cartopy.crs.Projection