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

precision? #84

Closed
zoobot opened this issue Feb 3, 2022 · 5 comments
Closed

precision? #84

zoobot opened this issue Feb 3, 2022 · 5 comments

Comments

@zoobot
Copy link

zoobot commented Feb 3, 2022

How are you doing the lng/lat precision? Is there a way to set the precision in ogr2ogr?
We are doing a form of geohashing and the precision is causing some collisions, could use one more digit of precision to avoid the collisions.
Thanks!

@zoobot
Copy link
Author

zoobot commented Feb 5, 2022

@wavded wavded Hi! Is there a way to set precision?
I tried -co DECIMAL_PRECISION=8 but that failed on shapefiles...
Thanks

@wavded
Copy link
Owner

wavded commented Feb 7, 2022

Hey @zoobot, sorry but I do not know offhand. I know you can pass any of the available ogr2ogr vector options in this tool. I would try your question on https://gis.stackexchange.com unless you can find more information in the driver documentation -> https://gdal.org/drivers/vector/index.html

@zoobot
Copy link
Author

zoobot commented Feb 7, 2022

Hi @wavded Thanks for your response!!
I asked on the spatial community slack and someone there was able to point me in the right direction:
-lco COORDINATE_PRECISION=8
I ended up having to set it a higher than 8, as it rounds to ceiling instead of truncates.
geojson spec

@wavded
Copy link
Owner

wavded commented Feb 7, 2022

Thanks for the follow up @zoobot ! Ok to close this?

@zoobot
Copy link
Author

zoobot commented Feb 7, 2022

Yes thanks!

@zoobot zoobot closed this as completed Feb 7, 2022
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

No branches or pull requests

2 participants