Dear List,
after some years of agony waiting for a bus from Tuscany ... (as far as
I remember it was due to issues in the public transport sector -
https://groups.google.com/g/spatialite-users/c/vKLokX4aSVU/m/qNDZDBoSAwAJ),
I have finished a redesign and rebuild of the JavaScript/WebAssembly
port of SpatiaLite 5.0.1. This was mostly to my personal delight to
figure out if it was doable at all - I doubt that many were seriously
using it.
In favor of a - hopefully - more user friendly, at bit SQLite cli
inspired API, I have abandoned the 'sql.js' API (WebAssembly port of
SQLite) and name that I was using initially - the project was initially
named 'spatiasql.js'. Of course I have shamelessly borrowed internals
from 'sql.js' to assemble the new library.
The new name is simply 'spl.js'. I did not dare to call it 'spatial.js'.
Although - to my surprise - the name is still available at npm.
The source code and dist builds (browser & node) are available at
https://github.com/jvail/spl.js
The browser file is bundled into a single JS file of ~4MB. Not exactly a
friendly size in the JS world but, well, it includes all (almost) the
latest from geos, proj (not the proj.db! - needs to be loaded), rttopo
and of course SQLite & the SpatiaLite extension. The size is not too
bad, I'd say, for such a content.
I have released a beta version for now and ran many tests including
SpatiaLite's own test cases. If anyone is interested to throw her/his JS
skills at it and give some feedback on the API or tests I'd appreciate it!
I think, in future it might be interesting to expose more SpatiaLite and
geos functions directly to be able to use them directly - even without a
database.
I might post this at some osgeo list as well to reach out to a few more
JS developers.
Bye,
Jan