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 offset from start instead of full coordinate to improve getArea() precision #15859

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

mike-000
Copy link
Contributor

Fixes #15856

The current method is subject to rounding errors when subtracting the results of multiplying large numbers (especially in wrapped worlds).

Copy link

📦 Preview the website for this branch here: https://deploy-preview-15859--ol-site.netlify.app/.

@mike-000 mike-000 marked this pull request as ready for review May 23, 2024 13:33
Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

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

Thanks, @mike-000

@ahocevar ahocevar merged commit d68efd2 into openlayers:main Jun 8, 2024
8 checks 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.

Polygon area calculation is inaccurate with large coordinate values
2 participants