Skip to content

Conversation

@petern48
Copy link
Collaborator

@petern48 petern48 commented Nov 25, 2025

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

When ST_Force3D received a MultiPolygon as input, it would previously downgrade it into a Polygon if possible. This PR makes it return a multipolygon even if it's a single polygon inside, which is the same behavior as Postgis.

How was this patch tested?

Added tests

Did this PR include necessary documentation updates?

  • No, this is a minor edge case

return transformer.transform(geometry);
}

protected Geometry transformMultiPolygon(MultiPolygon geom, Geometry parent) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is simply an override of this method in JTS's GeometryTransformer class to handle MultiPolygons separately.

@petern48
Copy link
Collaborator Author

R Build failure is unrelated. Looks like it's already in the process of being fixed: #2524

@petern48 petern48 marked this pull request as ready for review November 25, 2025 04:05
@petern48 petern48 requested a review from jiayuasu as a code owner November 25, 2025 04:05
@jiayuasu jiayuasu added this to the sedona-1.8.1 milestone Nov 25, 2025
@jiayuasu jiayuasu merged commit 4b5adf9 into apache:master Nov 25, 2025
38 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: ST_Force3d() returns polygon when input is multipolygon with a single nested polygon

2 participants