arc.js icon indicating copy to clipboard operation
arc.js copied to clipboard

Support for Decimal Precision

Open KD33 opened this issue 2 years ago • 4 comments

Is it possible to provide decimal precision as an option to generator.Arc? I'm working on optimizing a workflow that requires drawing a lot of lines. One of the optimizations I am making is to limit the precision of coordinate values (suggested by MapBox under the section Cleaning up your data https://docs.mapbox.com/help/troubleshooting/working-with-large-geojson-data/).

Trimming the precision at the same time that the coordinates are generated would save me the trouble of having to iterate through the coordinates after

Thanks

KD33 avatar Oct 28 '22 15:10 KD33

given that this isn't remotely professional grade surveying, my gut reaction is that the library would be best off rounding to 6 decimal places internally and calling it a day. happy to discuss alternatives if anyone has concerns though.

jgravois avatar Oct 28 '22 17:10 jgravois

That works. Thanks

KD33 avatar Oct 31 '22 13:10 KD33

a PR for this would be welcome. i don't plan on tackling it myself.

jgravois avatar Oct 31 '22 16:10 jgravois

a PR for this would be welcome. i don't plan on tackling it myself.

Sure. See PR 52

KD33 avatar Nov 04 '22 14:11 KD33

closed by #53 (better late than never)

jgravois avatar Aug 15 '24 16:08 jgravois