GH-4221: Add six GeoSPARQL 1.1 coordinate extrema functions - #4222
Open
edmondchuc wants to merge 3 commits into
Open
edmondchuc wants to merge 3 commits into
edmondchuc wants to merge 3 commits into
Conversation
edmondchuc
force-pushed
the
feat/geosparql/coordinate-functions
branch
2 times, most recently
from
September 14, 2026 06:23
6aab2d5 to
c8ff7d7
Compare
edmondchuc
force-pushed
the
feat/geosparql/coordinate-functions
branch
4 times, most recently
from
September 14, 2026 16:49
72e6179 to
74a8556
Compare
edmondchuc
force-pushed
the
feat/geosparql/coordinate-functions
branch
from
September 14, 2026 17:15
74a8556 to
a5bc3c9
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub issue resolved #4221
Adds the following GeoSPARQL 1.1 coordinate extrema functions:
geof:minXgeof:maxXgeof:minYgeof:maxYgeof:minZgeof:maxZThey return
xsd:doubleand are also available through GeometryWrapper.X and Y follow the input SRS axis order. For example,
EPSG:4326
LINESTRING(10 100, 20 120)gives maxX = 20 and maxY = 120.
This follows the function vocabulary’s first/second-dimension wording. I’ve opened GeoSPARQL #700 to clarify that wording across the related functions.
For Z, we inspect each member’s coordinate sequence independently. Members without Z are ignored, so measures aren’t mistaken for Z. NaN Z values are treated as missing; infinite Z values raise an expression error. If no finite Z value exists anywhere in the geometry, the function raises an expression error. Mixed-dimension collections give the same result regardless of member order.
X/Y extrema reject NaN and infinite values in the ordinate being evaluated. Empty geometries and inputs with no eligible ordinate also raise expression errors.
This also fixes coordinate handling that could lose Z/M values or declared layouts when reversing SRS axes, copying, cloning, or converting coordinate sequences. Measures-aware allocation preserves XYM when JTS splits a MultiPoint into individual points, preventing M values from being mistaken for Z.
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.