geotrellis / vectorpipe

Convert Vector data to VectorTiles with GeoTrellis.
https://geotrellis.github.io/vectorpipe/
Other
74 stars 20 forks source link

Support option to export ring geometries with Mapbox spec compliant winding #72

Closed CloudNiner closed 5 years ago

CloudNiner commented 5 years ago

From Mapbox specification:

Any polygon interior ring must be oriented with the winding order opposite that of their parent exterior ring and all interior rings must directly follow the exterior ring to which they belong. Exterior rings must be oriented clockwise and interior rings must be oriented counter-clockwise (when viewed in screen coordinates).

Vector tiles exported that don't provide spec compliant winding can break Mapbox GL JS rendering in subtle ways, such as by incorrectly rendering fill-extrusions: https://github.com/geotrellis/geotrellis-usbuildings/issues/4

CloudNiner commented 5 years ago

More generally, this issue could also be expanded to force either CCW or CW winding during export rather than being Mapbox specific.

mojodna commented 5 years ago

Does this fix / option belong in GeoTrellis's MVT generation code?

jpolchlo commented 5 years ago

That is probably true. Thoughts, @CloudNiner?

CloudNiner commented 5 years ago

Yeah, good point. I'd say that makes more sense. Closing here and reopening a new issue over there.

CloudNiner commented 5 years ago

See https://github.com/locationtech/geotrellis/issues/2909