mgrs.MGRSGeoBox

A 10 x 10 km MGRS square backed by odc.geo.GeoBox.

Usage

Source

mgrs.MGRSGeoBox(
    mgrs_code,
    shape,
    affine,
    crs,
)

Parameters

mgrs_code: str

MGRS reference.

shape: SomeShape

Raster dimensions.

affine: Affine

Pixel-to-CRS transform.

crs: CRS
Cell CRS.

Methods

Name Description
__repr__() Return a string representation of the MGRSGeoBox.
from_mgrs() Create a grid square from a 10 km MGRS reference.

__repr__()

Return a string representation of the MGRSGeoBox.

Usage

Source

__repr__()

from_mgrs()

Create a grid square from a 10 km MGRS reference.

Usage

Source

from_mgrs(mgrs_code, resolution=10.0)
Parameters
mgrs_code: str

MGRS reference.

resolution: float = 10.0
Pixel size in metres.
Returns
MGRSGeoBox
Grid square.
Raises
ValueError
If resolution is not positive, does not evenly divide the 10 km grid square, or mgrs_code is not a 10 km reference (two location digits, e.g. "32TMT64").