Error processing valid "EMPTY" WKT features
Closed this issue · 0 comments
When submitting a document with an EMPTY WKT feature (such as "POINT EMPTY" or "MULTIPOINT EMPTY"), Nunaliit fails to process the geometry and throws an error similar to the one below. It continues to retry but never succeeds.
Error processing document **** (simplifyGeometry)
java.lang.Exception: Error parsing WKT string: MULTIPOINT EMPTY
at ca.carleton.gcrc.geom.wkt.WktParser.parseWkt(WktParser.java:29)
at ca.carleton.gcrc.couch.onUpload.conversion.GeometryDescriptor.getGeometry(GeometryDescriptor.java:35)
at ca.carleton.gcrc.couch.onUpload.simplifyGeoms.GeometrySimplifierImpl.simplifyGeometry(GeometrySimplifierImpl.java:73)
at ca.carleton.gcrc.couch.onUpload.UploadWorkerThread.performSimplifyGeometryWork(UploadWorkerThread.java:792)
at ca.carleton.gcrc.couch.onUpload.UploadWorkerThread.performWork(UploadWorkerThread.java:264)
at ca.carleton.gcrc.couch.onUpload.UploadWorkerThread.activity(UploadWorkerThread.java:161)
at ca.carleton.gcrc.couch.onUpload.UploadWorkerThread.run(UploadWorkerThread.java:132)
According to various sources on WKT, "EMPTY" is a valid alternative to the usual parentheses containing coordinates. See:
https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
https://www.ibm.com/docs/en/db2-warehouse?topic=formats-well-known-text-wkt-format
https://gis.stackexchange.com/questions/109889/wkt-what-is-the-reasoning-behind-the-concept-of-a-point-empty
We obviously can't simplify EMPTY geometries but if it is valid WKT we should accept it and not spin our wheels.