GNOME Bugzilla – Bug 757159
GeoJSON: Holes in polygons are filled.
Last modified: 2015-10-27 18:58:21 UTC
Created attachment 314168 [details] Simple polygon with hole. Polygon features in GeoJSON can have holes, however currently the holes in polygons are filled as well. See attached screenshot comparing Maps and geojson.io for a simple polygon with a hole. The geojson for this polygon is attached as well. 1: this is also true for other geodata serialisations I believe.
Created attachment 314170 [details] Screenshot showing Maps and geojson.io rendering above mentioned polygon. Screenshot showing Maps and geojson.io rendering above mentioned polygon.
Created attachment 314185 [details] [review] GeoJSONSource: Do not fill holes in polygons The cairo EVEN_ODD fill rule will not fill if the total number of intersections is even. I think this will solve this issue for us. Magic is on our side. https://bugzilla.gnome.org/show_bug.cgi?id=757159
Created attachment 314186 [details] Hole in polygon after patch
Review of attachment 314185 [details] [review]: OK!
Attachment 314185 [details] pushed as d35d8e7 - GeoJSONSource: Do not fill holes in polygons