For a polygon defined as a sequence of (x,y) points, how can I detect whether it is complex or not? A complex polygon has intersections with itself, as shown:
I want to draw a city district area on Google Maps using Polygon class and an array of lat/lng coordinates. OpenStreetMap provides me all data I need — i