mgrs.MGRSGrid
The 10 km MGRS squares intersecting an area of interest.
Usage
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_geometrycarries 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
__getitem__(self, index: int) -> MGRSGeoBox
__getitem__(self, index: slice) -> Self__iter__()
Iterate over grid squares.
Usage
__iter__()__len__()
Return the number of grid squares.
Usage
__len__()to_geodataframe()
Return the grid squares in WGS84.
Usage
to_geodataframe()Returns
gpd.GeoDataFrame- One row per square with its MGRS and UTM metadata.