Skip to content

Conversation

@wanjing-1116
Copy link
Collaborator

This PR updates the cross-tile merge logic to accommodate recent changes
in Shapely’s geometry API.

In newer versions of Shapely, the unary_union attribute is deprecated,
and the recommended replacement is geometry.union_all(). In addition,
the union operation may return either a Polygon or a MultiPolygon,
whereas the previous implementation implicitly assumed a MultiPolygon
and accessed .geoms unconditionally.

This PR replaces the deprecated unary_union call with
geometry.union_all() and adds explicit handling for Polygon vs
MultiPolygon outputs. This prevents tile-level merge failures that
occurred due to the changed return type behavior, and restores stable
cross-tile merging without altering the original merge semantics.

Tested on the Nigeria 2024 configuration: the merge completes
successfully and the merged GeoParquet is generated as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants