spl.js 0.1.0-beta.6 → 0.1.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Makefile CHANGED
@@ -3,7 +3,7 @@ BUILD_DIR = $(PWD)/src/build
3
3
  BC_DIR = $(BUILD_DIR)/bc
4
4
  PREFIX = --prefix=$(BC_DIR)
5
5
 
6
- SQLITE_VERSION = 3360000
6
+ SQLITE_VERSION = 3390400
7
7
  GEOS_VERSION = 3.9.0
8
8
  PROJ_VERSION = 9.1.0
9
9
  RTTOPO_VERSION = 1.1.0
@@ -97,7 +97,7 @@ iconv-src:
97
97
 
98
98
  sqlite-src:
99
99
  cd $(BUILD_DIR); \
100
- wget -nc https://www.sqlite.org/2021/sqlite-autoconf-$(SQLITE_VERSION).tar.gz; \
100
+ wget -nc https://www.sqlite.org/2022/sqlite-autoconf-$(SQLITE_VERSION).tar.gz; \
101
101
  tar -xf sqlite-autoconf-$(SQLITE_VERSION).tar.gz;
102
102
 
103
103
  sqlite-conf: sqlite-src
@@ -108,7 +108,7 @@ sqlite-conf: sqlite-src
108
108
  sqlite: sqlite-conf
109
109
  cd $(SQLITE_SRC); \
110
110
  emmake make -j4 \
111
- CFLAGS="$(EMX_FLAGS) -DSQLITE_CORE -DSQLITE_ENABLE_FTS5 -DSQLITE_USE_URI=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_DEFAULT_FOREIGN_KEYS=1" \
111
+ CFLAGS="$(EMX_FLAGS) -DSQLITE_CORE -DSQLITE_ALLOW_ROWID_IN_VIEW -DSQLITE_ENABLE_FTS5 -DSQLITE_USE_URI=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_JSON1 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_DEFAULT_FOREIGN_KEYS=1" \
112
112
  LDFLAGS="-s ERROR_ON_UNDEFINED_SYMBOLS=0"; \
113
113
  emmake make install;
114
114
 
package/README.md CHANGED
@@ -9,10 +9,13 @@ Comments, bug reports and suggestions are welcome! spl.js will remain beta at le
9
9
  ## Install
10
10
 
11
11
  ```bash
12
- npm install spl.js@0.1.0-beta.6
12
+ npm install spl.js
13
13
  ```
14
14
 
15
- The library for browsers bundles both the WebWorker script and the wasm file (~ 4MB). A minimal proj.db including EPSG codes for lon/lat to "Web Mercator" and UTM is embeded. Other PROJ files and the complete proj.db are available from the `dist/proj` folder.
15
+ The library for browsers bundles both the WebWorker script and the wasm file (~ 4MB).
16
+
17
+ A minimal proj.db including EPSG codes for lon/lat to "Web Mercator" and UTM is embeded. Other PROJ files and the complete proj.db are available from the `dist/proj` folder.
18
+ If you like to use the full proj.db instead you need to mount it to `/proj/proj.db` and set the path with spatialite's `PROJ_SetDatabasePath`.
16
19
 
17
20
  [Apparently](https://github.com/jvail/spl.js/issues/1) typescript has no option to switch between `main` and `browser` entrypoints in `package.json`. For typescript & browser development you need to import spl.js (async version) as
18
21
 
@@ -133,11 +136,9 @@ Sources: https://github.com/jvail/spl.js/tree/main/examples
133
136
 
134
137
  ### Notebook (observablehq) examples:
135
138
 
136
- https://observablehq.com/collection/@abenrob/spatialite
137
-
138
- https://observablehq.com/@bert/spatialite-with-spl-js
139
+ https://observablehq.com/@neocartocnrs/spatialite
139
140
 
140
- https://observablehq.com/@visionscarto/hello-spl-js
141
+ https://observablehq.com/collection/@abenrob/spatialite
141
142
 
142
143
  ## API
143
144
 
@@ -246,8 +247,12 @@ With `sync` (browser only) all ArrayBuffers will be transfered without copying (
246
247
 
247
248
  ## Extensions API (Browser only)
248
249
 
250
+ *Experimental since Firefox does currently not support dynamic imports in Workers.*
251
+
249
252
  Sometimes you want to run code inside the WebWorker. With this API you can supply additional functions to extend the `SPL` and `DB` APIs executed inside the WebWorker.
250
253
 
254
+ Example: https://jvail.github.io/spl.js/examples/extensions.html
255
+
251
256
  ### Example Code
252
257
 
253
258
  ```js