From 1526ac58ed6af42bc0a38f5fcef232532b2b5afd Mon Sep 17 00:00:00 2001 From: "Gregory H. Halverson" Date: Fri, 24 Oct 2025 11:00:32 -0700 Subject: [PATCH] lat and lon attributes for Point --- pyproject.toml | 2 +- rasters/point.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e4537b0..9695368 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rasters" -version = "1.13.0" +version = "1.13.1" description = "raster processing toolkit" readme = "README.md" authors = [ diff --git a/rasters/point.py b/rasters/point.py index 0f3cc6c..6f85c36 100644 --- a/rasters/point.py +++ b/rasters/point.py @@ -160,7 +160,10 @@ def lat(self) -> float: Returns: float: The latitude value. """ - return self.latlon.y + if self.is_geographic: + return self.y + else: + return self.latlon.y @property def lon(self) -> float: @@ -173,7 +176,10 @@ def lon(self) -> float: Returns: float: The longitude value. """ - return self.latlon.x + if self.is_geographic: + return self.x + else: + return self.latlon.x def buffer( self,