Check winding
Closed this issue · 1 comments
bhousel commented
Looking into this issue: osmlab/osm-community-index#334 (comment)
I'm using location-conflation to process the features with turf. In this case we're unioning all of the gb
features together, but many of them get left out. For example, Isle of Man shows up as a hole:
My guess is that both the GeoJSON spec and Turf are picky about polygon winding, and that some of the features in Country Coder are not wound consistently.
- A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.
We can probably just run everything through https://github.com/mapbox/geojson-rewind to make sure they are following the right hand rule.
bhousel commented
Turns out this issue is not with winding, it's just a bug in my code.. rapideditor/location-conflation#4
But the winding is probably good to fix anyway.