With buffer: 0, geometry coincident with a tile edge is clipped inconsistently#102
With buffer: 0, geometry coincident with a tile edge is clipped inconsistently#102
Conversation
|
The issue here is that geojson-vt currently clips inclusively (which happens in the passing test), but the second test fails because the clipping line (0.25) doesn't exactly match the projected y coordinate, which due to numerical errors equals 0.24999999999999983. A fix for that will be to clip one-directionally — inclusive on one side and exclusive on the other, just like the VT3 proposal. I'll push a fix and update the tests to reflect this. |
|
@jfirebaugh check this out now. Note that in the tests, one |
|
Looks good to me, and it passes the tests in gl-js that were failing before. 👍 |
|
@jfirebaugh released as v3.1.1. |
When using geojson-vt to generate bufferless tiles, a LineString geometry that is coincident with a tile edge is clipped inconsistently:
It should be consistent one way or the other -- although possibly different from either of these two behaviors. For bufferless tiles in VT3, we're thinking of formally specifying that tiles are effectively inclusive of their top and left edges, and exclusive of their bottom and right edges, such that the correct behavior in this case is to include this type of coincident geometry in only the bottom and right tiles.
cc @mourner @anandthakker