This module provides classes and functions to facilitate working with geographical data.
These are the 5 regions used in the article:
//R_CA.json
{"name": "CA", "bbox": [-125, 32, -113, 43], "pixel_size": 0.01}
//R_PT.json
{"name": "PT", "bbox": [-10, 36, -6, 44], "pixel_size": 0.01}
//R_BR.json
{"name": "BR", "bbox": [-58, -20, -44, -5], "pixel_size": 0.01}
//R_MZ.json
{"name": "MZ", "bbox": [30, -27, 41, -10], "pixel_size": 0.01}
//R_AU.json
{"name": "AU", "bbox": [113, -27, 154, -10], "pixel_size": 0.01}
Examples:
r = Region(name='PI', bbox=[-10, 36, 5, 44], pixel_size=0.01)
r
r.shape
test_eq(r.shape, (800, 1500))
r.transform
test_eq(r.transform, rasterio.Affine(0.01, 0.0, -10.0, 0.0, -0.01, 44.0))
lon, lat = r.coords()
lon