-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't let polygons with nonzero area disappear during cleaning #241
Conversation
If they collapse, turn them into placeholder squares with the appropriate area so that there aren't visible coverage gaps.
Interesting. @flippmoke started throwing these out recently in mapnik-vector-tile and I've also felt like this needed to be able to be an option for keeping small polys for certain visualization needs (mapbox/mapnik-vector-tile#131). @ericfischer can you debrief more on your motivation here and what you think reasonable defaults are? |
@springmeyer Tippecanoe's stated intent has always been that
Most of the way that I have accomplished this so far is that any polygon whose area is smaller than a pixel will never be drawn directly; instead, the rounding error will be accumulated across the tile until there is at least a pixel worth of "tiny polygon" area that can all be assigned to whichever lucky tiny polygon wins the jackpot and gets to be drawn as a pixel. This change in this PR is because it turned out that polygons with an area larger than a pixel might still decay to nothing during polygon cleaning if downsampling to the tile grid worked out badly. As the screenshot in #240 shows, this could leave large empty areas where all the polygons decayed badly in the same way, leaving no representative data. I am not really satisfied with the shapes of the fabricated polygons in either situation. If the "tiny polygons" are adjacent, as in the case of these parcels, really they should be coalesced together rather than approximated with squares. But I don't know any better way to handle tiny polygons that are detached from one another, as building footprints often are. Stretching the area of the "lucky" polygon instead of drawing it as a square does not look good. So I don't know whether this is necessarily the right policy for Mapnik, but it is the best way I've found so far to approximate a visually continuous experience from each zoom to the next. |
Thank you for the explanation @ericfischer |
nice work @ericfischer Since you've cranked out a few point releases this week, could we please get a Github release for v1.11.4? I'll use it to update the Homebrew formula. Thanks! |
Thanks @timiyay! Tagged https://github.com/mapbox/tippecanoe/releases/tag/1.11.4. |
Thanks. The Homebrew update is in the pipeline: Homebrew/homebrew-core#944 |
Thank you @timiyay! |
If they collapse, turn them into placeholder squares with the
appropriate area so that there aren't visible coverage gaps.