Closed timhicks-ala closed 1 year ago
Because the WKT of this polygon is not enclosed
Replacing the last coordinates with the first one will work POLYGON((141.447222 -38.353333, 141.921389 -38.373611, 142.011111 -38.487778, 141.883333 -38.570556, 141.659444 -38.491667, 141.447222 -38.353333))
HOW to test:
Go to "Add to map" -> Area Choose -> "Enter area coordinates (WKT)" Paste the WKT content above
You should see a dialog: Invalid WKT:Points of LinearRing do not form a closed linestring
Issue raised in https://support.ehelp.edu.au/a/tickets/118264
Take this sample WKT:
POLYGON((141.447222 -38.353333, 141.921389 -38.373611, 142.011111 -38.487778, 141.883333 -38.570556, 141.659444 -38.491667))
This creates a valid search area in Biocache spatial search, so is definitely valid: https://biocache.ala.org.au/occurrences/search?q=*%3A*&qc=&wkt=MULTIPOLYGON%28%28%28141.447222+-38.353333%2C141.921389+-38.373611%2C142.011111+-38.487778%2C141.883333+-38.570556%2C141.659444+-38.491667%2C141.447222+-38.353333%29%29%29#tab_mapView
Adding the same WKT as an area within SP fails with this non-specific error message:
Testing the same feature with nonsense data shows SP can tell that a given WKT is valid or invalid:
So there is an issue with Spatial correctly validating a WKT string, but not being able to create an area from it. There is no issue with loading a shapefile (I successfully tested this with an unrelated shapefile) so the issue lies in creating an area from a WKT.