Skip to content

GH-4278: Add geof:transform function - #4279

Merged
afs merged 1 commit into
apache:mainfrom
edmondchuc:feat/geosparql/transform
Oct 7, 2026
Merged

afs merged 1 commit into
apache:mainfrom
edmondchuc:feat/geosparql/transform

Conversation

@edmondchuc

@edmondchuc edmondchuc commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

GitHub issue resolved #4278

Support IRI and xsd:anyURI target CRS arguments, preserve geometry datatypes, and validate GML coordinate layouts.

Depends on PR #4277. Four nonfinite projection regression tests currently fail pending that fix. After it merges, we’ll rebase onto main and rerun the tests before merging this PR.


  • 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 feat/geosparql/transform branch 3 times, most recently from d5d7a7d to d3e3d9f Compare September 30, 2026 16:47
assertEquals(WKTDatatype.URI, result.getGeometryDatatypeURI());
assertEquals(UTM34N, result.getSrsURI());
Point projectedPoint = (Point)result.getParsingGeometry();
assertEquals(799997.8, projectedPoint.getX(), 1.0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this example obtained from epsg.io? Please add a link to such transformation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exactly!

@afs

afs commented Oct 6, 2026

Copy link
Copy Markdown
Member

The build is showing some errors:
https://github.com/apache/jena/actions/runs/36746730083/job/112184784052?pr=4279

(to run locally, run "mvn clean install")

[ERROR] Failures: 
[ERROR]   TransformFFTest.invalidLatitudeProjectionIsAnExpressionError:253->expectProjectionExpressionError:365 unexpected exception type thrown; expected:<org.apache.jena.sparql.expr.ExprEvalException> but was:<java.lang.NumberFormatException>
[ERROR]   TransformFFTest.northPoleProjectionIsAnExpressionError:243->expectProjectionExpressionError:365 unexpected exception type thrown; expected:<org.apache.jena.sparql.expr.ExprEvalException> but was:<java.lang.NumberFormatException>
[ERROR] Errors: 
[ERROR]   TransformFFTest.invalidLatitudeProjectionLeavesBindUnbound:258->evaluate:420 » NumberFormat Character N is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
[ERROR]   TransformFFTest.northPoleProjectionLeavesBindUnbound:248->evaluate:420 » NumberFormat Character I is neither a decimal digit number, decimal point, nor "e" notation exponential mark.

Support IRI and xsd:anyURI target CRS arguments, preserve geometry datatypes, and validate GML coordinate layouts. Include direct-function and SPARQL BIND tests.
@edmondchuc
edmondchuc force-pushed the feat/geosparql/transform branch from d3e3d9f to ed6476f Compare October 6, 2026 13:46
@edmondchuc

Copy link
Copy Markdown
Contributor Author

Thanks @afs for merging in #4277. After rebasing onto main, the tests now pass locally with those changes included.

@afs
afs merged commit d774384 into apache:main Oct 7, 2026
1 check passed
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.

Add GeoSPARQL 1.1 geof:transform function

3 participants