Skip to content

Commit 19bdc5f

Browse files
Merge pull request #58 from gregory-halverson-jpl/main
including bounds attributes xmin, xmax, ymin, ymax for RasterGrid
2 parents 1d3a255 + f272723 commit 19bdc5f

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "rasters"
7-
version = "1.13.2"
7+
version = "1.14.0"
88
description = "raster processing toolkit"
99
readme = "README.md"
1010
authors = [

rasters/raster_grid.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,22 @@ def cols(self) -> int:
301301
"""
302302
return self._cols
303303

304+
@property
305+
def xmin(self) -> float:
306+
return self.x_origin
307+
308+
@property
309+
def xmax(self) -> float:
310+
return self.x_origin + self.width
311+
312+
@property
313+
def ymin(self) -> float:
314+
return self.y_origin - self.height
315+
316+
@property
317+
def ymax(self) -> float:
318+
return self.y_origin
319+
304320
@property
305321
def grid(self) -> RasterGrid:
306322
return RasterGrid.from_affine(self.affine, self.rows, self.cols, self.crs)

0 commit comments

Comments
 (0)