Outer rings sometimes dropped
nvkelso opened this issue · 2 comments
Outside of Bremen, Germany some of the larger meadow
landuse polygons are broken / missing large pieces in MVT compared to the same tile in TopoJSON. (I vaguely remember the same thing happening to some of the plodder "wetland/ farmland" landuse outside of Amsterdam, too?)
To replicate this problem "Open" the following GIST into Tangram Play:
https://api.github.com/gists/35bc3a9b8adb925dd7e4e8c64f60c506
And zoom the map to (update the address bar URL):
10.8042/53.1278/8.6035
Changing the source from MVT:
osm:
type: MVT
url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt
to GeoJSON:
osm:
type: GeoJSON
url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.json
Shows the raw output of tile build is okay, but the later transformation encoding the features to MVT is borked.
Bad MVT encoding:
Good source GeoJSON tiles:
/cc @hjanetzek
see my issues #103
because the polygon part
to solve like this
for example:
a polygon in geojson >>
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[0, 0],
[10, 0],
[0, 10],
[0, 0]
],
[
[15, 0],
[15, 15],
[30, 0],
[15, 0]
]
]
}
}
you must make it to MultiPolygon like this
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[[
[0, 0],
[10, 0],
[0, 10],
[0, 0]
]],
[[
[15, 0],
[15, 15],
[30, 0],
[15, 0]
]]
]
}
}