verde.project_region¶
- 
verde.project_region(region, projection)[source]¶
- Calculate the bounding box of a region in projected coordinates. - Parameters
- region (list = [W, E, S, N]) – The boundaries of a given region in Cartesian or geographic coordinates. 
- projection (callable or None) – If not None, then 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_region (list = [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)