You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
each coordinate keeps a switch indicating whether it's from original data or introduced through clipping
if a tile contains at least one original point, slice deeper (up to z14)
otherwise stop tiling
This solution should reduce the number of tiles significantly while keeping all the necessary precision, is dead simple to implement, and removes the need for any other heuristics (such as based on num. of features, coordinates, simplification etc.).
It assumes we only need precision for areas where we have actual data points — all lines and polygons going "through" tiles don't need as much precision. Does this sound like a good assumption?
The text was updated successfully, but these errors were encountered:
This sounds like a great first pass to reduce work. The only small glitch I can think of would be slight mis-alignment between lines at tile edges if:
you have a line crossing a tile that - before clipping - does not have any vertices inside the tile. This tile is only rendered at z0
the line is very dense with precise coordinates on the adjacent tile and it needs to be rendered at a much higher zoom level: lets say z10
the impact of rounding to integers might mean that the z0 line - when overzoomed - does not visually match up with the z10 line.
Hopefully this would not happen in practice however and if we ever encountered it the artifcact would be minor and perhaps easily avoided by enforcing something like a max differential: if one tile needs rendered up to z10 then make sure to render all geometries up to at least z10-N.
mourner
changed the title
Stop tiling further if a tile only contains points introduced through clipping
Better strategy for determining when to stop tiling depending on tile data
Dec 3, 2014
@springmeyer great remark! I thought about the misalignment for a while and it lead me to a super-simple idea that completely solves the problem while reducing the initial work even further: mapbox/mapbox-gl-js#464 (comment)
The basic idea is to tile until the number of coordinates in the tile is low enough on the first GeoJSON preprocessing run, and leave the rest for tiling on demand in case the user zooms in.
This solution should reduce the number of tiles significantly while keeping all the necessary precision, is dead simple to implement, and removes the need for any other heuristics (such as based on num. of features, coordinates, simplification etc.).
It assumes we only need precision for areas where we have actual data points — all lines and polygons going "through" tiles don't need as much precision. Does this sound like a good assumption?
The text was updated successfully, but these errors were encountered: