Open marklit opened 1 year ago
I think the problem here is that BigQuery uses GEOGRAPHY
, which is based on a spherical geometry model. It is perfectly possible to create geometries that do not self-intersect in the cartesian plane but do when projected on a sphere. In essence, this is issue is an extension of #16.
For small enough geometries running MakeValid in gnomonic projection will create valid geographies, but this will not fix world-spanning issues.
I believe you're using GEOS' invalid geometry detector. I've seen a large number of geometry that will pass through its filters without issue but will be rejected by BigQuery. Is there any chance more validation libraries could be added that detect a larger number of issues?
Below is an example of WKB string that is rejected by BigQuery but DuckDB/GEOS reports as being valid.
I converted the WKB above into WKT for the example below.
These are a collection of BigQuery geometry rejection error messages I've seen. I removed the numbers from their messages so they're easier to group together.