I am trying to upload the FCC's Study Area Boundaries into Google BigQuery for analysis with other data. I used QGIS to fix the geometries and convert the shapefile to a newline delimited geojson. Shapely and QGIS say that all the polygons in the geojson are valid. However, when I attempt to make a BigQuery table from the geojson, BigQuery has the following error:
Could not convert JSON value to geography: Invalid polygon loop: Edge 52 crosses edge 54; in loop 15 Field: geometry; Value: {"type": "MultiPolygon", "coordinates": [[[[-71.084213, 45.305475], [-71.084695, 45.305694], ...
I found the coordinates for edge 52 and edge 54 in loop 15, and this is what they look like in QGIS: If I remove the coordinate that sticks out, the error changes to be about another set of points that do the same thing.
How can I find all the errors of this type, and, ideally, fix them without manually removing each extraneous coordinate?