mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
552 stars 117 forks source link

Features dropping when creating tiles from GeoJSON containing GeometryCollections #286

Open fullbit-tech opened 6 years ago

fullbit-tech commented 6 years ago

As per my discussion with @springmeyer in https://github.com/mapbox/mapnik-vector-tile/issues/284 there appears to be an issue with the support of GeometryCollections when creating tiles from geojson.

In some cases the features appear to be dropped across tile boundaries, though I have been unable to determine what the exact offending circumstances are. I isolated a cleaner test case from one of the culprit data sets, which you can get here.

I am using https://github.com/mapbox/mapbox-tile-copy v5.1.1 to generate the tiles but I tested with the latest release as well, and the issue persists.

Here is what the feature is supposed to look like (I flattened the geojson in this example using https://github.com/Turfjs/turf/tree/master/packages/turf-flatten):

not-clipped

And here is what it looks like without flattening the geojson:

clipped

I've created a working example here.

Please let me know if there is anything else I can provide to help isolate the problem.

Cheers.

springmeyer commented 6 years ago

Thanks @fullbit-tech - going to tag in @flippmoke to take a look as I'm unavailable to debug this going forward.