From 92025ea06bae28932e8ba0e959bc256d9e14d59f Mon Sep 17 00:00:00 2001 From: "Gregory H. Halverson" Date: Thu, 23 Oct 2025 17:03:51 -0700 Subject: [PATCH] lat and lon attributes for Point --- pyproject.toml | 2 +- rasters/point.py | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6e8c3d8..e4537b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rasters" -version = "1.12.3" +version = "1.13.0" description = "raster processing toolkit" readme = "README.md" authors = [ diff --git a/rasters/point.py b/rasters/point.py index 9aa76b6..0f3cc6c 100644 --- a/rasters/point.py +++ b/rasters/point.py @@ -149,6 +149,32 @@ def y(self) -> float: """ return self.geometry.y + @property + def lat(self) -> float: + """ + Get the latitude of the point. + + Latitude is the y-coordinate in a geographic coordinate system (like WGS84), + representing the north-south position on the Earth's surface in decimal degrees. + + Returns: + float: The latitude value. + """ + return self.latlon.y + + @property + def lon(self) -> float: + """ + Get the longitude of the point. + + Longitude is the x-coordinate in a geographic coordinate system (like WGS84), + representing the east-west position on the Earth's surface in decimal degrees. + + Returns: + float: The longitude value. + """ + return self.latlon.x + def buffer( self, distance,