-
find max and min vertex y of polygon
-
get tile of max vertex for max_zoom
-
get intersections of a horizontal line at the tile's y value across the polygon
-
add tiles from the first intersection (far left) to intersection + 1 (use tilebelt.pointToTile, which is fast)
-
go to intersection + 2 and repeat [4] until there are no intersections left (this would skip over holes and caves)
-
go to [3] for the tile one y down until you hit the min vertex tile's y
-
return all the tiles that were added (first recursively merge tiles up if min_zoom != max_zoom)
Last active
August 29, 2015 14:06
-
-
Save morganherlocker/85916a92f147add000e2 to your computer and use it in GitHub Desktop.
cover stripe algo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment