elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

Adds ST_SIMPLIFY geo spatial function

Open ncordon opened this issue 3 months ago â€ĸ 11 comments

Adds ST_SIMPLIFY geo spatial function, which simplifies a geo-shape using the Douglas Peuker algorithm. Inspiration taken from the Postgres corresponding function

It can be tested as:

ROW geo_shape = TO_GEOSHAPE("POLYGON((0 0, 1 0.1, 2 0, 2 2, 1 1.9, 0 2, 0 0))") 
| EVAL result = st_simplify(geo_shape, 2)
| KEEP result
;

Its first argument is the geo shape to simplify, its second argument is a tolerance that must be non-negative and could be either an integer or a double.

Closes #44747

ncordon avatar Oct 09 '25 16:10 ncordon

Hi @ncordon, I've created a changelog YAML for you.

elasticsearchmachine avatar Oct 09 '25 16:10 elasticsearchmachine

Hi @ncordon, I've updated the changelog YAML for you.

elasticsearchmachine avatar Oct 09 '25 16:10 elasticsearchmachine

â„šī¸ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory) ✅ When features change state (e.g. preview, ga) in a specific version ✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version ❌ Don't add new information that applies to a specific version without an applies_to tag ❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

github-actions[bot] avatar Oct 20 '25 15:10 github-actions[bot]

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

elasticsearchmachine avatar Oct 21 '25 08:10 elasticsearchmachine

Hi @ncordon, I've updated the changelog YAML for you.

elasticsearchmachine avatar Nov 26 '25 10:11 elasticsearchmachine

@ncordon It doesn't look like @elastic/kibana-security owns any changes here. Is there something specific you'd like us to review, or can I remove the review request?

jeramysoucy avatar Dec 01 '25 17:12 jeramysoucy

@ncordon It doesn't look like @elastic/kibana-security owns any changes here. Is there something specific you'd like us to review, or can I remove the review request?

Sorry @jeramysoucy. I just realized probably because initially I bumped a dependency in this pr, teams that have projects using that dependency or that module might have been requested a review. I've removed those from the list now.

ncordon avatar Dec 01 '25 17:12 ncordon

This PR appears to have caused some cross cluster search tests to be auto-muted due to a high number of failures (e.g https://github.com/elastic/elasticsearch/issues/138908 https://github.com/elastic/elasticsearch/issues/138909)

The remote cluster was dying with the following error

[2025-11-20T08:49:05,136][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [remote_cluster-0] fatal error in thread [elasticsearch[remote_cluster-0][search][T#2]], exiting
java.lang.NoSuchMethodError: 'org.locationtech.jts.geom.LinearRing org.locationtech.jts.geom.Polygon.getExteriorRing()'

Do you think those failures are related to this change and if so have they been resolved? Thanks

davidkyle avatar Dec 02 '25 16:12 davidkyle

This PR appears to have caused some cross cluster search tests to be auto-muted due to a high number of failures (e.g https://github.com/elastic/elasticsearch/issues/138908 https://github.com/elastic/elasticsearch/issues/138909)

The remote cluster was dying with the following error

[2025-11-20T08:49:05,136][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [remote_cluster-0] fatal error in thread [elasticsearch[remote_cluster-0][search][T#2]], exiting java.lang.NoSuchMethodError: 'org.locationtech.jts.geom.LinearRing org.locationtech.jts.geom.Polygon.getExteriorRing()'

Do you think those failures are related to this change and if so have they been resolved? Thanks

Hey @davidkyle, I can see the linked Gradle job https://gradle-enterprise.elastic.co/s/htow3jmopz524 is from 26th of December, before this commit a1e9d29cc153cdf6e580af0f9a121244183a0963, so it is fixed. And yes that's definitely related to this pr.

There's another Gradle build which is not linked to this pr: https://gradle-enterprise.elastic.co/s/nx3kehu25fkyo, so not sure what that's related to.

ncordon avatar Dec 02 '25 17:12 ncordon

Thanks for looking into this @ncordon

There's another Gradle build which is not linked to this pr: https://gradle-enterprise.elastic.co/s/nx3kehu25fkyo, so not sure what that's related to.

Yup that's a different failure.

davidkyle avatar Dec 03 '25 09:12 davidkyle