Skip to content

GH-4230: Preserve declared layout of nested WKT collections in geometryN - #4262

Open
edmondchuc wants to merge 1 commit into
apache:mainfrom
edmondchuc:fix/geosparql/geometry-n-nested-layout
Open

edmondchuc wants to merge 1 commit into
apache:mainfrom
edmondchuc:fix/geosparql/geometry-n-nested-layout

Conversation

@edmondchuc

@edmondchuc edmondchuc commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Part of #4230

Selecting a nested WKT GeometryCollection with mixed member layouts could replace the collection’s declared XY, Z, M, or ZM layout with that of its first member. This change preserves the declared layout when selecting a member with geof:geometryN and when writing the result back to WKT.


  • Tests are included.
  • Documentation change and updates are provided for the Apache Jena website
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

@edmondchuc
edmondchuc force-pushed the fix/geosparql/geometry-n-nested-layout branch from 66ff676 to 193d6b1 Compare September 27, 2026 13:21
…geometryN

Previously, declared coordinate layout was only stashed in userData for
empty aggregates. In DimensionInfo.find, inspecting the first member took
precedence over userData. Consequently, selecting a nested collection with
heterogeneous children (e.g., GEOMETRYCOLLECTION M containing a Point Z)
caused the collection to inherit its first child's coordinate layout
rather than preserving its own declared layout.

Retain the declared coordinate layout on all aggregates during WKT parsing,
and prioritize this retained layout over the first-member fallback in
DimensionInfo.find. Add tests for nested collections with XY, M, Z, and ZM
markers through geometryN selection and WKT round trips.
@edmondchuc
edmondchuc force-pushed the fix/geosparql/geometry-n-nested-layout branch from 193d6b1 to cd919e9 Compare September 27, 2026 13:30
@afs afs added the GeoSPARQL label Sep 28, 2026
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.

2 participants