mgrs.MGRSGrid

The 10 km MGRS squares intersecting an area of interest.

Usage

Source

mgrs.MGRSGrid(
    filter_geometry,
    resolution=10.0,
)

Adjacent UTM zones may overlap because each zone is gridded independently.

Parameters

filter_geometry: GeoSeries | GeoArray | BaseGeometry

Area of interest in WGS84. Intersecting squares are included whole.

resolution: float = 10.0
Pixel size in metres. Must divide 10 km evenly.

Raises

ValueError
If filter_geometry carries a CRS other than WGS84.

Methods

Name Description
__getitem__() Return an MGRSGeoBox by index or a sliced MGRSGrid.
__iter__() Iterate over grid squares.
__len__() Return the number of grid squares.
to_geodataframe() Return the grid squares in WGS84.

__getitem__()

Return an MGRSGeoBox by index or a sliced MGRSGrid.

Usage

Source

__getitem__(self, index: int) -> MGRSGeoBox
__getitem__(self, index: slice) -> Self

__iter__()

Iterate over grid squares.

Usage

Source

__iter__()

__len__()

Return the number of grid squares.

Usage

Source

__len__()

to_geodataframe()

Return the grid squares in WGS84.

Usage

Source

to_geodataframe()
Returns
gpd.GeoDataFrame
One row per square with its MGRS and UTM metadata.