Skip to content

Commit f6ada15

Browse files
Merge pull request #56 from gregory-halverson-jpl/main
lat and lon attributes for Point
2 parents 5e657bd + d7d1c08 commit f6ada15

2 files changed

Lines changed: 9 additions & 3 deletions

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.0"
7+
version = "1.13.1"
88
description = "raster processing toolkit"
99
readme = "README.md"
1010
authors = [

rasters/point.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ def lat(self) -> float:
160160
Returns:
161161
float: The latitude value.
162162
"""
163-
return self.latlon.y
163+
if self.is_geographic:
164+
return self.y
165+
else:
166+
return self.latlon.y
164167

165168
@property
166169
def lon(self) -> float:
@@ -173,7 +176,10 @@ def lon(self) -> float:
173176
Returns:
174177
float: The longitude value.
175178
"""
176-
return self.latlon.x
179+
if self.is_geographic:
180+
return self.x
181+
else:
182+
return self.latlon.x
177183

178184
def buffer(
179185
self,

0 commit comments

Comments
 (0)