Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use faster maths to project WGS84 to mercator #88231

Merged
merged 6 commits into from
Jul 4, 2022

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Jul 1, 2022

This commit changes the from strict maths to sloppy maths when we compute the projection from WGS84 to spherical mercator. Precision is more than enough and test shows a meaningful speed up when doing it for big geometries. the test performed locally shows a ~15% improvement.

@iverase iverase added >enhancement :Analytics/Geo Indexing, search aggregations of geo points and shapes v8.4.0 labels Jul 1, 2022
@iverase iverase requested a review from craigtaverner July 1, 2022 15:17
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jul 1, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@craigtaverner craigtaverner left a comment

Choose a reason for hiding this comment

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

I did have a question about skipping a test, but otherwise I think this looks good.

@@ -143,6 +143,7 @@ tasks.named("yamlRestTestV7CompatTransform").configure { task ->
task.skipTest("indices.freeze/10_basic/Test index options", "#70192 -- the freeze index API is removed from 8.0")
task.skipTest("sql/sql/Paging through results", "scrolling through search hit queries no longer produces empty last page in 8.2")
task.skipTest("service_accounts/10_basic/Test get service accounts", "new service accounts are added")
task.skipTest("spatial/70_script_doc_values/diagonal length", "precision changed in 8.4.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we permanently skip this test? I see you changed the test result in the yaml file so do we need to skip this at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are skipping the V7 compatibility test (yamlRestTestV7CompatTransform) . It seems this mode is running the test on the v7 branch against this cluster. That currently fails because the change in precision which is fine.

@@ -143,4 +143,4 @@ setup:
script:
source: "doc['geo_shape'].getMercatorHeight()"
- match: { hits.hits.0.fields.width.0: 389.62170283915475 }
- match: { hits.hits.0.fields.height.0: 333.37976840604097 }
- match: { hits.hits.0.fields.height.0: 333.37976841442287 }
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice if we could assert on values with a precision.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not help here.

@iverase iverase merged commit 7930d98 into elastic:master Jul 4, 2022
@iverase iverase deleted the mercator_fast branch July 4, 2022 09:35
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 Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants