rounding to the nearest integer
captain-igloo opened this issue · 1 comments
captain-igloo commented
Why are points rounded here? Aren't the rounded numbers are less accurate?
Could a configuration option be added to control this behaviour?
My use case - I have a circle as a polygon, when I draw the result from geojson-vt on the canvas it is not as smooth due to the rounding. See screenshot, the circle on the left is the original, the one on the right has had its coordinates rounded.
mourner commented
They are rounded because they should be integers according to the vector tile specification. To increase precision, you need to make the layer extent
bigger (in geojson-vt, it's 4096 for a tile by default).