Closed hugoledoux closed 10 years ago
Maybe we should add an additional validation/repair process even before the triangulation. Syntactic repair?
Also, we should probably move this code to Polygon_repair.cpp.
I still think that OGR should have that somewhere, or some code somewhere. Insane if we have to write that ourselves. PostGIS has good code, we should check it.
duh, it shouldn't check if first-last are the same, we're repairing these things too! So it's probably okay now, except the segfault
Fixed in new code.
Added some defensive code to parse the WKT, but OGR doesn't seem to handle all case. Eg:
$ ./prepair --wkt 'POLYGON((0 0))' Segmentation fault: 11
And it doesn't check the first-last are the same either