Skip to content

Conversation

@omricohenn
Copy link
Contributor

@omricohenn omricohenn commented Mar 22, 2025

#123111

This PR enhances the WKT parser to support explicit dimensionality declarations ("Z" and "M") as specified in the OGC Simple Features standard. Previously, Elasticsearch allowed a third dimension in WKT but did not explicitly support declaring that dimension as Z or M.

Changes

  • Added support for "POINT Z" and "POINT M" syntax in the WKT parser
  • Both formats require exactly three coordinates
  • Added validation to ensure three coordinates are provided when Z or M is specified
  • Added constants for Z and M in the Point class
  • Added comprehensive test cases for all supported and unsupported formats
  • Improved error messages for invalid input formats
  • The _search API returns documents containing Z/M coordinates exactly as they were indexed, without any code modifications

Not supported

  • The "ZM" dimensionality declaration (four dimensions) is not supported, as specified in the ticket.

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.1.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Mar 22, 2025
@omricohenn omricohenn changed the title Support explicit Z/M coordinate values in WKT parsing for GeoPoint ge… Support explicit Z/M coordinate values in WKT parsing for GeoPoint Mar 22, 2025
@iverase iverase self-assigned this Mar 24, 2025
@iverase iverase added >enhancement :Analytics/Geo Indexing, search aggregations of geo points and shapes and removed needs:triage Requires assignment of a team area label labels Mar 24, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 24, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@iverase
Copy link
Contributor

iverase commented Mar 24, 2025

I was hoping to add support for Z/M for any type of geometry, not only points. Would that be possible?

@omricohenn
Copy link
Contributor Author

omricohenn commented Mar 24, 2025

@iverase sure, are you sure all the geometries should support it? I just couldn't find any official standard specifications that mention support for other geometries with Z/M. Could you please share if there are any?

@iverase
Copy link
Contributor

iverase commented Mar 25, 2025

The standard is here: https://www.ogc.org/publications/standard/sfa/

@omricohenn omricohenn closed this Mar 28, 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.

3 participants