A very simple script to compute all self-intersections in a GeoJSON polygon.
Takes a complex (i.e. self-intersecting) GeoJSON polygon, and breaks it down into its composite simple, non-self-intersecting one-ring polygons.
Detect if a polygon has self intersecting lines