-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Part of geometries missing at tiles borders for MVT #289
Comments
I suspect this is more of a MapServer issue. What version are you using? Do you have a test case? |
Thinking about this more - @robrichter, could this be a client/rendering issue? I mean, the MVT file just contains the point coordinate and not the symbol, so the clipping is a rendering artifact. There is an edge buffer used as part of the production - it's set in the MVT output format:
You could try bumping that value and see what happens. --Steve |
Problem doesn't seem to be Mapcache related. Our Mapfile:
I tried increasing edge buffer and nothing changed. So I tried to omit Mapcache and request Mapserver directly via I tried changing edge buffer from 0 to 1000 and request the same tile. All created pbf files had the exactly same size. It seems that buffer is ignored. Any idea what am I doing wrong? |
What software is doing the rendering part? It seems that the circle symbol in one tile is rendered correctly but then the adjacent tile is rendered on top of that layer and the the polygon fill paints partly over the symbol. I do not know how these issues are usually handled on the client side vector tile rendering. The result should be good if all the polygon layers would be rendered first for all tiles, and the POI layer would be painted last. This issue Leaflet/Leaflet.VectorGrid#149 looks pretty similar. I cannot read https://github.com/MapServer/MapServer/blob/01d0e7cfb9f92542a578704439edfc713e041d06/mapmvt.c well enough to say if EDGE_BUFFER is also increasing the rectangle that is used to do SELECT with ST_Intersects so that the points which are close to the tile borders get selected into both adjacent tiles. Lines and polygons do not need extended BBOX for selecting, just for clipping. |
Is that OpenLayers? We got a report about labels which were cut at the MVT tile boundaries. We noticed that an application that was using MapLibre GL JS was showing labels fine but OpenLayers did not. We could correct the label issue by using an option A possible lesson to learn is that because vector tiles are rendered on the client side then also the reason for the rendering issues may be in the client. Of course data can have an effect as well. |
Yes, we use OpenLayers. But we also tried T-REX as mvt source with exactly same Postgis data. We used buffer_size=30. Everything worked fine. As I mentioned in my previous post, it seems to me that edge buffer in Mapserver is not working at all for us. We tried to use option "declutter": true on OpenLayers client and the results are strange. Some points were missing in lower zooms and started to appear when zooming in. And it also badly affected styling. Only some points were styled the rest remained blank, see screenshot below. |
You can open the .pbf tile files with QGIS as a plain vector layer (Layer-Add Layer-Add vector layer). Save the two adjacent .pbf tiles on disk and check if the problematic point is included only into one tile. If that is the case you are right with your assumption about edge buffer. You can by the same study if it happens to have some effect on lines and polygons. |
I'd like to look into this more but need a test case if possible. |
@sdlime Thanks |
Data is great. A simple client setup would also be helpful - a skeleton OpenLayers page. |
There is OL client example Please let me know if it is sufficient |
Thanks, will try to get that running on a dev box. |
We are serving MVT via Mapcache/Mapserver. Problem is that part of geometires at tiles borders are missing. We tried to use meta_buffer to solve the problem but its not implemented for raw format. Is there some workaround?
The text was updated successfully, but these errors were encountered: