Skip to content

Commit

Permalink
quickfix for DriverVectorCube support in chunk_polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Jun 11, 2024
1 parent c1b8676 commit 0492296
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openeogeotrellis/geopysparkdatacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,14 @@ def chunk_polygon(

if isinstance(reducer, dict):
reducer = GeoPySparkBackendImplementation.accept_process_graph(reducer)
chunks: List[Polygon] = chunks.geoms

if isinstance(chunks, Polygon):
chunks = [chunks]
elif isinstance(chunks, MultiPolygon):
chunks: List[Polygon] = chunks.geoms
else:
raise ValueError(f"Invalid type for `chunks`: {type(chunks)}")

jvm = get_jvm()

result_collection = None
Expand Down

0 comments on commit 0492296

Please sign in to comment.