mapbox/geojsonhint

polygon with crossing edges

Closed this issue · 2 comments

Would it be possible to add a "polygon with crossing edges" warning in geojsonhint ?
mongodb 2dsphere index doesn't support such polygons and I would like detec it in advance

image

tmcw commented

Yep, definitely a good idea to start including some warnings. I think turf-kinks might help us out here. Note of course that crossing rings are valid in geojson, so these won't be errors.

tmcw commented

Folding into #48 that proposes this amongst other geometry validation steps.