mapbox / tippecanoe

Build vector tilesets from large collections of GeoJSON features.
BSD 2-Clause "Simplified" License
2.73k stars 432 forks source link

Start and end tile during tiling process #873

Open waybarrios opened 4 years ago

waybarrios commented 4 years ago

Hi guys,

Does it possible to set start and end tile for an specific zoom level? If so, which part of the code do I need to change? For example:

At zoom level 13

Start tile at 13/5186/YYYY and End tile at 13/5209/YYYY

I wanna do that in order to paralyze all the tile process per chunks tiles.

e-n-f commented 3 years ago

There is not a way to do this without changing the code. It's trickier than it looks to skip tiles because each thread reads linearly through a serialized form of all the tiles that it is supposed to process, so you can't just add a check and return early from per-tile processing if the tile number is out of range.

Probably the easiest place to add it is here, so that the feature is only added to the work for the next zoom level if tile nextzoom/tx * span + xo/ty * span + yo is in the range of tiles that you want this process to handle.