Skip to content

Commit 34cb5ca

Browse files
Merge pull request #45 from gregory-halverson/main
fixing wrap_geometry pass-through behavior when given a RasterGeometry object
2 parents 9d1d9a5 + d38b31a commit 34cb5ca

3 files changed

Lines changed: 7 additions & 2 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.7.0"
7+
version = "1.7.1"
88
description = "raster processing toolkit"
99
readme = "README.md"
1010
authors = [

rasters/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.7.0
1+
1.7.1

rasters/wrap_geometry.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ def wrap_geometry(geometry: Any, crs: Union[CRS, str] = None) -> SpatialGeometry
4040
from .multi_point import MultiPoint
4141
from .polygon import Polygon
4242
from .multi_polygon import MultiPolygon
43+
from .raster_geometry import RasterGeometry
44+
45+
if isinstance(geometry, RasterGeometry):
46+
# If the geometry is a RasterGeometry, return it as is
47+
return geometry
4348

4449
# Check if the geometry is already a SpatialGeometry by checking for specific types
4550
if isinstance(geometry, (Point, MultiPoint, Polygon, MultiPolygon)):

0 commit comments

Comments
 (0)