Open cleder opened 8 months ago
I think that from_wkt
can be implemented more efficient with the switch statement.
Have a look at Raymond Hettingers Structural Pattern Matching in the Real World slides
Because structural patter matching is implemented in python 3.10+ any implementation on top of this should be implemented in a separate module, so we can fall back on the old implementation in case of import or syntax errors on import time.
GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POINT (0 0), MULTIPOINT (0 0, 1 1, 1 2, 2 2)), LINESTRING (0 0, 3 1)), POLYGON ((0 0, 1 1, 1 0, 0 0)))
cannot be parsed sucessfully