mapbox / mbtiles-extracts

Extract parts of MBTiles into separate files using a GeoJSON with polygons.
ISC License
51 stars 14 forks source link

Only one polygon is considered when a tile intersects multiple polygons #13

Closed arunasank closed 5 years ago

arunasank commented 5 years ago

A tile sometimes contains parts of multiple polygons as seen in the image below. (The portions of the two polygons are found at the top left and bottom right of the tile, shaded in light yellow)

screen shot 2018-11-11 at 1 30 52 pm

In a case like this, since we aren't using the multi option with which-polygon, which extracts all polygons intersecting with a tile bounding box, the tile is extracted only for a single polygon out of the two, whichever is processed first.

Solution

Enable the multi option with which-polygon

cc/ @mourner @answerquest