After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757159 - GeoJSON: Holes in polygons are filled.
GeoJSON: Holes in polygons are filled.
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: map view
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-26 23:00 UTC by Mattias Bengtsson
Modified: 2015-10-27 18:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple polygon with hole. (217 bytes, application/vnd.geo+json)
2015-10-26 23:00 UTC, Mattias Bengtsson
  Details
Screenshot showing Maps and geojson.io rendering above mentioned polygon. (984.84 KB, image/png)
2015-10-26 23:08 UTC, Mattias Bengtsson
  Details
GeoJSONSource: Do not fill holes in polygons (982 bytes, patch)
2015-10-27 06:24 UTC, Jonas Danielsson
committed Details | Review
Hole in polygon after patch (1.18 MB, image/png)
2015-10-27 06:25 UTC, Jonas Danielsson
  Details

Description Mattias Bengtsson 2015-10-26 23:00:04 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.
Comment 1 Mattias Bengtsson 2015-10-26 23:08:13 UTC
Created attachment 314170 [details]
Screenshot showing Maps and geojson.io rendering above mentioned polygon.

Screenshot showing Maps and geojson.io rendering above mentioned polygon.
Comment 2 Jonas Danielsson 2015-10-27 06:24:36 UTC
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
Comment 3 Jonas Danielsson 2015-10-27 06:25:57 UTC
Created attachment 314186 [details]
Hole in polygon after patch
Comment 4 Mattias Bengtsson 2015-10-27 12:43:29 UTC
Review of attachment 314185 [details] [review]:

OK!
Comment 5 Jonas Danielsson 2015-10-27 18:58:16 UTC
Attachment 314185 [details] pushed as d35d8e7 - GeoJSONSource: Do not fill holes in polygons