When importing polygons via gdal, automatically invert loops representing polygons larger than half of the Earth's surface. Add a command line flag to disable this, in case these polygons are expected (instead of being the result of incorrect polygon winding order - the common case). Additionally, verify that loop geometry is still valid once it's marshalled into the compact world. In rare cases, quantisation during point conversion and invalidate geometry, and if this happens, we drop the loop.
When importing polygons via gdal, automatically invert loops representing polygons larger than half of the Earth's surface. Add a command line flag to disable this, in case these polygons are expected (instead of being the result of incorrect polygon winding order - the common case). Additionally, verify that loop geometry is still valid once it's marshalled into the compact world. In rare cases, quantisation during point conversion and invalidate geometry, and if this happens, we drop the loop.