I have polygon that I'm getting from external source. The polygon is not valid.
In [36]: p
Out[36]: <Polygon object at 0x7fec6bea6ac0>
In [37]: p.valid
[12/Dec/2017 19:13:19] WARNING [django.contrib.gis:85] GEOS_NOTICE: Hole lies outside shell at or near point 260561.40600000042 776052
I know that I can fix the polygon in the DB using the MakeValid() django function.
Is there a way to fix the polygon before it is inserted to the DB, just using geos API?
Thanks.