geojson icon indicating copy to clipboard operation
geojson copied to clipboard

to_instance precision

Open jornedeblaere opened this issue 5 years ago • 5 comments

Due to the update of v2.4.1 to v2.5.0 the signature of the Geometry.init has changed by adding the precision parameter. As we work with precision=7 this causes some troubles with the base.to_instance() function as here no precision parameter is provided and thus in the parsing precision 6 is used. Although this can be overcome by injecting the precission in the input feature.geometry proptery, I think it would be a nice improvement if this precision parameter could be added in the to_instance() call as well.

jornedeblaere avatar Aug 21 '19 08:08 jornedeblaere

in addition, it would be nice to either have some way of passing parameters from the load() and loads() functions to the geometry objects, such as precision. If the parameters were exposed to to_instance() then a partially applied call could be passed as the object_hook parameter to load() but this isn't very user friendly.

mbway avatar Aug 22 '19 15:08 mbway

We have the same problem, we need to be able to set presicion on to_instance aswell. We are working with high precision devices also in research and need to be able to override the default also in to_presision.

So +1

klausmyrseth avatar Mar 24 '20 08:03 klausmyrseth

You can set the defaults as per this response until there is a fix: https://github.com/jazzband/geojson/issues/135#issuecomment-596509669

aj-hitchins avatar Apr 01 '20 13:04 aj-hitchins

+1. Working with precision AG data where the GPS coordinates were corrected with RTK down to 1 inch accuracy. Need a clean way to override the default precision of 6. The workaround is getting us by.

hhowe29 avatar Jul 01 '21 14:07 hhowe29

This is fixed on the master branch thanks to #177. DEFAULT_PRECISION can now be set at the package level. This feature will become available in the next release, sometime this month.

rayrrr avatar May 07 '22 01:05 rayrrr