mapbox / tile-cover

Generate the minimum number of tiles to cover a geojson geometry
MIT License
189 stars 40 forks source link

Ditch outline cover in polygon cover #47

Closed mourner closed 9 years ago

mourner commented 9 years ago

Here's an interesting thing about polygon covering performance (52k points, zoom 14):

image

This means that 81% of polygon cover is spent on tracing the outline (which is probably slower than it could be https://github.com/mapbox/tile-cover/issues/28#issuecomment-62872536).

Can we process special cases for the outline in the main sweep-line pass to ditch the line cover step for polygons completely? That would be a good win.

morganherlocker commented 9 years ago

@mourner It is definitely possible. The main case I know of where scanline breaks is for low slope horizontals. It drops tiles in these cases.

mourner commented 9 years ago

Sorry, I was wrong (error in the bench) — here's actual breakdown (5%, not 80%):

image