Open ChocopieKewpie opened 6 months ago
I think it should be able to handle them. Can you see one of the offending geometries? It's likely because it's not "closed": for validity, the start and end need to be the same point. See if you can get a WKT version of it.
It might be possible in fact that the act of "katana cutting" is creating an invalid geometry from valid input. However there is code to check and attempt to repair invalid input. As it works recursively, geoetries should remain valid throughout.
https://github.com/manaakiwhenua/vector2dggs/blob/main/vector2dggs/katana.py#L29
Perhaps the normalize should occur before checking validity? I don't know if normalising a geometry collection can create invalid geometries (I'd be surprised if it did).
Katana cutting does not handle LinearRings:
shapely.errors.GEOSException: IllegalArgumentException: Points of LinearRing do not form a closed linestring