[Geoserver-users] Guttering on map box vector tiles incorrect, and slivered polygons being served as polygons with zero area ...

Hi,

It doesn’t appear that the guttering setting is entirely working for mapbox vector tiles (I’m using the 2.10 snapshot with the vector tiles extension). Even though I set the gutter to zero, I still see negative pixel coordinates and coordinates greater than 256 when I look at the coordinates coming down from the server. The tile size is set to 256. Is there someway to turn guttering entirely off, so the features are clipped at the tile boundaries?

Also, I found what appears to be a violation of the mapbox vector tile spec. See https://github.com/mapbox/vector-tile-spec/tree/master/2.1. When I look at the geojson for a tile I can see one feature with a small rectangle geometry which is sliver-like. When I look at the same tile in its mapbox format, I get a polygon with the start position, then another position, and then the start position. The thinness of the rectangle must collapse to the same pixel. So basically what is being served down as a polygon is actually line-like (starting at a point, going to another point, and then going straight back to the same point). To have a valid polygon there must be at least two positions between the start-end coordinate. I’ve had to filter these polygons out, since their ring orientation is undefined.

Should I mention this problem as a bug??

Cheers,

Tom Cuthill

Hi, Tom,

Most people are asking for larger gutters around the tiles! You can set it the size in the code, but there isn’t an easy way to change it…

https://github.com/geoserver/geoserver/blob/master/src/extension/vectortiles/src/main/java/org/geoserver/wms/vector/PipelineBuilder.java#L80

I’m not sure why you are getting topological collapse - VTs uses the Topology Preserving generalisation code (although it backs off to a simpler method if there’s a problem).

cf https://github.com/geoserver/geoserver/blob/master/src/extension/vectortiles/src/main/java/org/geoserver/wms/vector/PipelineBuilder.java#L297

cf https://github.com/geoserver/geoserver/blob/master/src/extension/vectortiles/src/main/java/org/geoserver/wms/vector/PipelineBuilder.java#L335

Thanks,
Dave

···

On Mon, Feb 27, 2017 at 12:51 AM, Tom Cuthill <tomc@anonymised.com…> wrote:

Hi,

It doesn’t appear that the guttering setting is entirely working for mapbox vector tiles (I’m using the 2.10 snapshot with the vector tiles extension). Even though I set the gutter to zero, I still see negative pixel coordinates and coordinates greater than 256 when I look at the coordinates coming down from the server. The tile size is set to 256. Is there someway to turn guttering entirely off, so the features are clipped at the tile boundaries?

Also, I found what appears to be a violation of the mapbox vector tile spec. See https://github.com/mapbox/vector-tile-spec/tree/master/2.1. When I look at the geojson for a tile I can see one feature with a small rectangle geometry which is sliver-like. When I look at the same tile in its mapbox format, I get a polygon with the start position, then another position, and then the start position. The thinness of the rectangle must collapse to the same pixel. So basically what is being served down as a polygon is actually line-like (starting at a point, going to another point, and then going straight back to the same point). To have a valid polygon there must be at least two positions between the start-end coordinate. I’ve had to filter these polygons out, since their ring orientation is undefined.

Should I mention this problem as a bug??

Cheers,

Tom Cuthill


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-users mailing list
Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users