Vector tiles buffer

陌路散爱 提交于 2020-01-02 07:25:13

问题


I have issue setting up an Openlayers map with vector tiles served from Geoserver. The lines gets screwed up along the edges of the tiles. It looks like the lines are first clipped and then styled instead of the opposite. This makes wide lines look ugly.

Changing the renderBuffer in the OL client doesnt make any difference. I have similar issues with labels and perhaps the solution is pretty much the same in both cases.

EDIT: The geojson in QGIS shows that there is a buffer around the tiles:

geojson output in QGIS

EDIT 2: I have been doing som more research on the phenomenom and I think both Geoserver and Openlayers are to blame for the artifacts. As seen below, Geoserver does render with a buffer (the pink polygons(1 and 2) contains the black bordered tile extent) but does not include features that lies outside of the tile but inside of the buffer, like the green line(3) in the circle. That makes the tile rendered with a jack as in the left circle below. However, even when you have a line in a tile that goes close to the tile border, styled with quite a thick stroke, Openlayers wont render enough of the line outside the tile to make it styled without a jack. Like the right circle below. I have mote obvious examples of that bahviour. This could probably easily be fixed by setting a higher buffer/tolerance value for the tilerendering.

来源:https://stackoverflow.com/questions/40466547/vector-tiles-buffer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!