Skip to content

Conversation

@omricohenn
Copy link
Contributor

@omricohenn omricohenn commented Mar 29, 2025

This PR adds support for explicit 'Z' and 'M' dimensionality declarations in WKT geometry types according to OGC Simple Features standard. When 'Z' or 'M' is specified for any geometry type (Point, LineString, Polygon, etc.), three coordinates are now required. The parser validates this requirement and throws appropriate exceptions with clear error messages when insufficient coordinates are provided. Comprehensive tests have been added for all relevant geometry types. (#123111)

  • BBox (Rectangle) doesn't support 3D parsing using WKT, so until then it can't support Z or M.

@elasticsearchmachine elasticsearchmachine added v9.1.0 external-contributor Pull request authored by a developer outside the Elasticsearch team needs:triage Requires assignment of a team area label labels Mar 29, 2025
@omricohenn omricohenn changed the title Support explicit Z/M coordinate values in WKT parsing for geometry (#… Support explicit Z/M attributes using WKT geometry (#12311) Mar 29, 2025
@omricohenn omricohenn changed the title Support explicit Z/M attributes using WKT geometry (#12311) Support explicit Z/M attributes using WKT geometry Mar 29, 2025
@omricohenn
Copy link
Contributor Author

@iverase Hi, here is a new PR that adds explicit Z/M dimensionality support for all geometry types. I'd appreciate your review when you have time.

@mayya-sharipova mayya-sharipova added :Analytics/Geo Indexing, search aggregations of geo points and shapes >enhancement and removed needs:triage Requires assignment of a team area label labels Mar 31, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 31, 2025
@iverase iverase self-assigned this Apr 3, 2025
@iverase
Copy link
Contributor

iverase commented Apr 3, 2025

@elasticmachine ok to test

@iverase
Copy link
Contributor

iverase commented Apr 3, 2025

@elasticmachine test this please

Copy link
Contributor

@iverase iverase left a comment

Choose a reason for hiding this comment

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

I triggered test on the PR, it is looking good, I like the simplicity of the approach, thanks!

@iverase
Copy link
Contributor

iverase commented Apr 3, 2025

ci complains about this:

./gradlew ":x-pack:plugin:spatial:test" --tests "org.elasticsearch.xpack.spatial.index.mapper.ShapeFieldMapperTests.testIgnoreMalformedFalseByDefault" -Dtests.seed=FEB1971E04B8921F -Dtests.locale=en-Latn-US -Dtests.timezone=America/Thule -Druntime.java=24

@iverase
Copy link
Contributor

iverase commented Apr 3, 2025

@elasticmachine test this please

@omricohenn
Copy link
Contributor Author

@iverase thanks! added fix to handle EOF, could you take a look and rerun CI please?

@iverase
Copy link
Contributor

iverase commented Apr 3, 2025

CI is running. I added manually the changelog file.

@iverase
Copy link
Contributor

iverase commented Apr 3, 2025

@elasticmachine test this please

@omricohenn omricohenn requested a review from iverase April 3, 2025 14:58
@iverase iverase merged commit 856ee3a into elastic:main Apr 3, 2025
18 checks passed
@iverase
Copy link
Contributor

iverase commented Apr 3, 2025

Thank you @omricohenn !

@omricohenn
Copy link
Contributor Author

cool, thanks for the quick review @iverase !

andreidan pushed a commit to andreidan/elasticsearch that referenced this pull request Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Geo Indexing, search aggregations of geo points and shapes >enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants