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

Restrict coordinate precision to prevent floating-point rounding errors #137

Open
dhimmel opened this issue Feb 28, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@dhimmel
Copy link

dhimmel commented Feb 28, 2024

Here are some coordinates from runs.geojson:

[6.584877799999998,  45.2505965,         2723.1],
[6.5850034000000015, 45.250722300000014, 2727.72]

Note that floating point error is causing false precision. It looks like it might be possible to round or truncate these numbers at the max precision available in the source data and save some space in the materialized output.

Specifically, 45.250722300000014 could become 45.2507223.

I'm also joining coordinates across runs, so would have a bit more confidence in the veracity of that operation without the polymorphic precision.

@dhimmel
Copy link
Author

dhimmel commented Feb 28, 2024

@russellporter
Copy link
Owner

Makes sense! I think the referenced code is on the input side, maybe we need to do some rounding on the output side. Not too sure where the code is anymore..

@russellporter russellporter added the enhancement New feature or request label Oct 12, 2024
@russellporter russellporter transferred this issue from russellporter/openskidata-processor Oct 12, 2024
dhimmel added a commit to dhimmel/openskistats that referenced this issue Oct 15, 2024
refs russellporter/openskimap.org#137

and address NaN mean_bearing validation fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants