Skip to content

[GH-3260] Preserve M and ZM in Python GeometryUDT serialization - #3265

Draft
jiayuasu wants to merge 1 commit into
apache:masterfrom
jiayuasu:feature/python-geometryudt-m-dimensions
Draft

[GH-3260] Preserve M and ZM in Python GeometryUDT serialization#3265
jiayuasu wants to merge 1 commit into
apache:masterfrom
jiayuasu:feature/python-geometryudt-m-dimensions

Conversation

@jiayuasu

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

  • Yes, and the PR name follows the format [GH-XXX] my subject.

Part of #3260.

What changes were proposed in this PR?

  • Preserve M and ZM coordinate layouts in Sedona's native Python GeometryUDT serializer.
  • Detect measures through the optional GEOS 3.12 GEOSHasM_r API while retaining compatibility with older supported GEOS versions.
  • Preserve Z layouts when the first Z ordinate is NaN.
  • Make the pure-Python fallback reject M and ZM inputs instead of silently discarding their measure coordinates.
  • Add round-trip coverage for M and ZM points, lines, polygons, and geometry collections.

This is the first PR in the #3260 stack and is based on master.

How was this patch tested?

  • Native serializer tests passed with Shapely 2.1 and GEOS 3.13.
  • Legacy compatibility tests passed with Shapely 2.0 and GEOS 3.11.
  • Regression coverage includes XY, XYZ, XYM, and XYZM layouts, including first-ordinate NaN cases.
  • The repository commit-hook suite, including C formatting, Black, and git diff --check, passed.

Did this PR include necessary documentation updates?

  • No, this PR does not add or change a public API.

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.

1 participant