-
Notifications
You must be signed in to change notification settings - Fork 160
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
Tiles disappearing at particular zoom levels #197
Comments
The pattern of gaps as you zoom and pan look like problems I've had with geometries that become invalid when clipped at tile boundaries. It's not necessarily a
|
I wonder how much of this advice we should wrap into the system. We cannot easily do valid/makevalid without bogging down in CPU overhead. We could automatically fluff polygons up into multis without too much cost. |
For this particular case, yeah, the last time I saw this was when MVT output was still pretty new and we generated invalid outputs during tile clipping. The reason we use wagyu for clipping (still) is because it more reliably produces valid output. However, if you feed it invalid input then bets are off. |
I'm not sure if I have this wrong last time I tried loading multiploygons tileserver didn't see them but that may have been unrelated... so I used the following to load the data. Which as @eldang suggests might have made the geometries invalid.
I'm gonna try some of the suggestions |
Yea loading as multipolygons seems to have resolved this issue. basically loading using same command without the |
That's very curious... what does that load do that causes render to fail sometimes? |
I think what's going on in cases that are resolved by storing the source geometries as Multi* is that the the crop would turn a single polygon into two, and isn't done in a way that allows breaking them into two rows. I could see a universal cast-to-Multi being worth it for these, if the cost really is low enough. Would it be difficult to make that behaviour conditional on what the actual source geometry type is? Or is a redundant cast to |
If the problem is "clip turns poly into multipoly" surely we would have seen this in a lot more cases. It also means that there might actually be a bug hiding somewhere wanting to be fixed. If we could have the offending polygon and reproduce the behaviour, perhaps we'd find something (not in tileserv, but in PostGIS). Does the behaviour reproduce in the tileserv web UI, given the right input data? Step one is deriving a reproduceable case. |
I think it's specifically that a clip can make a multipolygon out of a polygon when the shape has two arms that are connected on one side of the cut line and disconnected on the other. I've mostly run into this with blatantly gerrymandered electoral districts.... I can probably cook up a test case next week with Texas data, but it might be more useful to start with the specific file that opened this issue. @sabman is it something publicly available, and if so could you share a link? |
Yea I can create SQL dumps for both cases. One with polygon and the other with multipolygon. Would that be enough to start with? |
If you can dump the one offending polygon, in the form (poly or multi) that is causing the problem, that would cut down the amount of hunting we have to do. |
The zip file contains the two versions of the polygon seen in video above created via
Original as geojson https://gist.github.com/sabman/d008a15d83d88eb1bed3a5853bbcd61f |
I'm seeing the following with the latest release of
pg_tileserv
Version 1.0.10
dissapearing-tiles.mp4
related: #160
The text was updated successfully, but these errors were encountered: