verde.project_region

verde.project_region#

verde.project_region(region, projection)[source]#

Calculate the bounding box of a region in projected coordinates.

Parameters:
regionlist = [W, E, S, N]

The boundaries of a given region in Cartesian or geographic coordinates.

projectioncallable

Should be a callable object (like a function) projection(easting, northing) -> (proj_easting, proj_northing) that takes in easting and northing coordinate arrays and returns projected northing and easting coordinate arrays.

Returns:
proj_regionlist = [W, E, S, N]

The bounding box of the projected region.

Examples

>>> def projection(x, y):
...     return (2*x, -1*y)
>>> project_region((3, 5, -9, -4), projection)
(6.0, 10.0, 4.0, 9.0)

Examples using verde.project_region#

Projection of gridded data

Projection of gridded data