Skip to content

Commit

Permalink
working on point extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-halverson committed Nov 5, 2024
1 parent b2a35e5 commit 1bfc631
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rasters/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,9 @@ def geolocation(self) -> Raster:
return self.contain(geometry=self.geometry.geolocation)

def to_point(self, point: Point):
if not self.geometry.intersects(point):
return np.nan

index = self.geometry.index_point(point)
value = self.array[index]

Expand Down

0 comments on commit 1bfc631

Please sign in to comment.