-
Notifications
You must be signed in to change notification settings - Fork 275
Open
Labels
Description
I switched from version 2.4.0 to 3.2.1 because of a fixed issue with polygon clipping.
Unfortunately version 3.2.1 has another polygon clipping issue:
myData = {
type: "FeatureCollection",
features: [
{
type: "Feature",
geometry: {
type: "Polygon",
coordinates: [[[-90, -90], [0, -90], [90, -90], [0, 0], [-90, -90]]]
// This coordinates would be clipped correct:
// coordinates: [[[-90, -90], [90, -90], [0, 0], [-90, -90]]]
}
}
]
};
myOptions = {
indexMaxZoom: 0,
maxZoom: 24,
tolerance: 1.5,
extent: 4096,
buffer:0
};
geojsonvt(myData, myOptions).getTile(1, 1, 1).features[0].geometry;Expected
The half of the shape on the eastern hemisphere
like: [[[0, 4096], [2048, 4096], [0,0], [0, 4096]]]
Results
v2.4.0: [[[0, 4096], [0,0], [0,0], [2048, 4096], [0, 4096]]] okayish
v3.2.1: [[[2048, 4096], [0, 0], [0, 0]]] wrong
Reactions are currently unavailable