sanak / geos-wasm-tester

GEOS-WASM (https://github.com/chrispahm/geos-wasm) tester app which has similar interface with JTS TestBuilder.
https://sanak.github.io/geos-wasm-tester/
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Skip to load input empty geometry and output exception geometry #13

Open sanak opened 11 months ago

sanak commented 11 months ago

Currently, if input geometry is empty (like POINT EMPTY), the following error occurred.

Uncaught Error: Cannot fit empty extent provided as `geometry`
    at assert (asserts.js:11:11)
    at View.fit (View.js:1353:7)
    at zoomToExtent (mapiopanel.js?t=1697297407333:349:21)
    at MapIoPanel.loadInput (mapiopanel.js?t=1697297407333:462:7)
    at HTMLSelectElement.loadTestCase (testcasepanel.js:198:24)

Also, if output (result) geometry is none by exception, the following error occurred.

Error: Invalid geometry type: EXCEPTION
    at Parser.parseGeometry_ (WKT.js:546:15)
    at Parser.parse (WKT.js:293:17)
    at WKT.parse_ (WKT.js:629:19)
    at WKT.readGeometryFromText (WKT.js:677:27)
    at WKT.readFeatureFromText (WKT.js:639:23)
    at WKT.readFeature (TextFeature.js:36:17)
    at featureFromWkt (mapiopanel.js?t=1697297407333:311:31)
    at MapIoPanel.loadOutput (mapiopanel.js?t=1697297407333:468:23)
    at updateOutput (geosop.js?t=1697297376663:160:26)
    at GeosOp.compute (geosop.js?t=1697297376663:455:13)

Above errors need to be handled correctly.