mgrs.MGRSGeoBox
A 10x10 km MGRS grid square backed by odc.geo.GeoBox.
Usage
mgrs.MGRSGeoBox(
mgrs_code,
shape,
affine,
crs,
)Parameters
mgrs_code: str-
MGRS grid reference (e.g.
"32TMT64"). shape: SomeShape-
Raster dimensions
(height, width)in pixels. affine: Affine-
Affine transformation from pixel to CRS coordinates.
crs: CRS- The coordinate reference system of the cell.
Methods
| Name | Description |
|---|---|
| __repr__() | Return a string representation of the MGRSGeoBox. |
| from_mgrs() | Create a grid square from an MGRS reference string. |
__repr__()
Return a string representation of the MGRSGeoBox.
Usage
__repr__()from_mgrs()
Create a grid square from an MGRS reference string.
Usage
from_mgrs(mgrs_code, resolution=10.0)Parameters
mgrs_code: str-
MGRS grid reference (e.g.
"32TMT64"). resolution: float = 10.0- Pixel resolution in metres. Default is 10.0.
Returns
MGRSGeoBox- The grid square as a GeoBox.
Raises
ValueError-
If
resolutionis not positive, does not evenly divide the 10 km grid square, ormgrs_codeis not a 10 km reference (two location digits, e.g."32TMT64").