Hi,
I have a list of polygon geometries in WKT format, some simple polygons and some multipolygons.
All are using the MULTIPOLYGON type in the WKT, for example :
MULTIPOLYGON(((1 1,1 2,2 2,3 3,3 1,1 1)))
MULTIPOLYGON(((1 1,1 4,4 4,4 1,1 1)),((2 2,2 3,3 3,3 2,2 2)))
MULTIPOLYGON(((1 1,1 5,5 5,5 1,1 1)),((2 2,2 3,3 2,2 2)),((3 4,4 4,4 3,3 4)))
But some of them don't have the first coordinates repeated at the end, so it is not a valid WKT.
If I take the same examples, it would look like :
MULTIPOLYGON(((1 1,1 2,2 2,3 3,3 1)))
MULTIPOLYGON(((1 1,1 4,4 4,4 1)),((2 2,2 3,3 3,3 2)))
MULTIPOLYGON(((1 1,1 5,5 5,5 1)),((2 2,2 3,3 2)),((3 4,4 4,4 3)))
I want to find all the features lacking the last coordinates repeated.
Any idea how ?
Until now, I tried building a list with all coordinates, it can work for the simple polygon but for multipolygons I don't know how to handle it.