Skip to content

Commit

Permalink
Updated Gdal and Emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
bugra9 committed Mar 26, 2022
1 parent 9bcaefd commit b65b4c8
Show file tree
Hide file tree
Showing 6 changed files with 522 additions and 1,583 deletions.
4 changes: 2 additions & 2 deletions .info.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"coverageUrl": "https://gdal3.js.org/coverage",
"nativeDependencies": [
{
"name": "Emscripten 1.39.19",
"name": "Emscripten 3.1.7",
"url": "https://github.com/emscripten-core/emscripten",
"licenseUrl": "https://github.com/emscripten-core/emscripten/blob/main/LICENSE"
},
{
"name": "Gdal 3.4.1",
"name": "Gdal 3.4.2",
"url": "https://github.com/OSGeo/gdal",
"licenseUrl": "https://github.com/OSGeo/gdal/blob/master/gdal/LICENSE.TXT"
},
Expand Down
2 changes: 1 addition & 1 deletion GDAL_EMCC_FLAGS.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ GDAL_EMCC_FLAGS += -s EXPORTED_FUNCTIONS="[\
'_CPLSetThreadLocalConfigOption'\
]"

GDAL_EMCC_FLAGS += -s EXTRA_EXPORTED_RUNTIME_METHODS="[\
GDAL_EMCC_FLAGS += -s EXPORTED_RUNTIME_METHODS="[\
'setValue',\
'getValue',\
'ccall',\
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GDAL_VERSION = 3.4.1
GDAL_VERSION = 3.4.2
SPATIALITE_VERSION = 5.0.1
SQLITE_VERSION = 3370000
GEOS_VERSION = 3.9.2
Expand Down Expand Up @@ -61,7 +61,7 @@ $(DIST_DIR)/gdal3WebAssembly.js: $(ROOT_DIR)/lib/libgdal.a
$(ROOT_DIR)/lib/libproj.a $(ROOT_DIR)/lib/libsqlite3.a $(ROOT_DIR)/lib/libz.a $(ROOT_DIR)/lib/libspatialite.a \
$(ROOT_DIR)/lib/libgeos.a $(ROOT_DIR)/lib/libgeos_c.a $(ROOT_DIR)/lib/libwebp.a $(ROOT_DIR)/lib/libexpat.a $(ROOT_DIR)/lib/libwebpdemux.a \
$(ROOT_DIR)/lib/libtiffxx.a $(ROOT_DIR)/lib/libtiff.a $(ROOT_DIR)/lib/libjpeg.a $(ROOT_DIR)/lib/libgeotiff.a \
-o gdal3WebAssembly.js $(GDAL_EMCC_FLAGS) \
-o $@ $(GDAL_EMCC_FLAGS) \
--preload-file $(ROOT_DIR)/share/gdal@/usr/share/gdal \
--preload-file $(ROOT_DIR)/share/proj@/usr/share/proj;

Expand Down Expand Up @@ -208,7 +208,7 @@ $(ROOT_DIR)/lib/libsqlite3.a: $(SQLITE3_SRC)/Makefile
$(SQLITE3_SRC)/Makefile: $(ROOT_DIR)/lib/libz.a $(SQLITE3_SRC)/configure
cd $(SQLITE3_SRC); \
$(EMCONFIGURE) ./configure $(PREFIX) --enable-shared=no \
CFLAGS="-I$(ROOT_DIR)/include -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_JSON1 -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_NORMALIZE" \
CFLAGS="-I$(ROOT_DIR)/include -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_JSON1 -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_NORMALIZE" \
CPPFLAGS="-I$(ROOT_DIR)/include" \
LDFLAGS="-L$(ROOT_DIR)/lib";

Expand Down Expand Up @@ -299,7 +299,7 @@ $(ROOT_DIR)/lib/libexpat.a: $(EXPAT_SRC)/Makefile

$(EXPAT_SRC)/Makefile: $(EXPAT_SRC)/configure
cd $(EXPAT_SRC); \
$(EMCONFIGURE) ./configure $(PREFIX) --enable-shared=no;
$(EMCONFIGURE) ./configure $(PREFIX) --enable-shared=no --without-getrandom --without-sys-getrandom;

$(EXPAT_SRC)/configure:
mkdir -p $(SRC_DIR); \
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ It runs on the browser and files are converted on the client side.
## Supported Formats

### Raster
**Read & Write**
**Read & Write** \
AAIGrid, ADRG, ARG, BLX, BMP, BT, BYN, CALS, CTable2, DTED, EHdr, ELAS, ENVI, ERS, FIT, GIF, GPKG, GRIB, GS7BG, GSAG, GSBG, GTX, GTiff, HF2, HFA, IDA, ILWIS, INGR, ISCE, ISIS2, ISIS3, JPEG, KMLSUPEROVERLAY, KRO, LAN, LCP, Leveller, MBTiles, MEM, MFF, MFF2, MRF, NITF, NTv2, NWT_GRD, PAux, PCIDSK, PCRaster, PDS4, PNG, PNM, R, RMF, ROI_PAC, RRASTER, RST, Rasterlite, SAGA, SGI, SIGDEM, SRTMHGT, Terragen, USGSDEM, VICAR, VRT, WEBP, XPM, XYZ, ZMap, Zarr

**Read Only**
**Read Only** \
ACE2, AIG, AirSAR, BIGGIF, BSB, CAD, CEOS, COASP, COSAR, CPG, CTG, DERIVED, DIMAP, DIPEx, DOQ1, DOQ2, ECRGTOC, EIR, ESAT, ESRIC, FAST, FujiBAS, GFF, GRASSASCIIGrid, GSC, GXF, GenBin, IRIS, ISG, JAXAPALSAR, JDEM, L1B, LOSLAS, MAP, MSGN, NDF, NGSGEOID, NWT_GRC, OZI, PDS, PRF, RIK, RPFTOC, RS2, SAFE, SAR_CEOS, SDTS, SENTINEL2, SNODAS, SRP, STACIT, STACTA, TGA, TIL, TSX

**Write Only**
**Write Only** \
COG, PDF


### Vector
**Read & Write**
**Read & Write** \
CSV, DGN, DXF, ESRI Shapefile, FlatGeobuf, GML, GPKG, GPSBabel, GPSTrackMaker, GPX, GeoJSON, GeoJSONSeq, GeoRSS, Geoconcept, JML, KML, MBTiles, MVT, MapInfo File, MapML, Memory, ODS, OGR_GMT, PCIDSK, PDS4, S57, SQLite/Spatialite, TIGER, VDV, VICAR, WAsP, XLSX

**Read Only**
**Read Only** \
ARCGEN, AVCBin, AVCE00, CAD, EDIGEO, ESRIJSON, Idrisi, LVBAG, OGR_PDS, OGR_SDTS, OGR_VRT, OSM, OpenFileGDB, REC, SVG, SXF, TopoJSON, UK .NTF, VFK

**Write Only**
**Write Only** \
PDF, PGDUMP


Expand All @@ -55,7 +55,7 @@ Note: It doesn't work with web worker.
```js
initGdalJs({ path: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/package', useWorker: false }).then((Gdal) => {});
```
> Example: [https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser](https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser) \
> Example: [https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser](https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser)
**Script (Local)**
```html
Expand All @@ -65,7 +65,7 @@ initGdalJs({ path: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/package', u
```js
initGdalJs().then((Gdal) => {});
```
> Example: [https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser-worker](https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser-worker) \
> Example: [https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser-worker](https://github.com/bugra9/gdal3.js/tree/master/apps/example-browser-worker)
**ES Module**
```html
Expand Down Expand Up @@ -190,12 +190,12 @@ console.log(newCoords); // [ [ 3021629.2074563554, 4639610.441991095 ] ]
[https://gdal3.js.org/docs](https://gdal3.js.org/docs)

## Examples
- Full working example with worker and Vue.js -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/app-gui/), [Live](https://gdal3.js.org/)
- Browser with Worker -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-browser-worker/), [Live](https://gdal3.js.org/examples/example-browser-worker/)
- Browser without Worker -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-browser/), [Live](https://gdal3.js.org/examples/example-browser/)
- Browser with Worker (Module) -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-module-browser-worker/), [Live](https://gdal3.js.org/examples/example-module-browser-worker/)
- Browser without Worker (Module) -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-module-browser/), [Live](https://gdal3.js.org/examples/example-module-browser/)
- Node.js -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-node/)
- Full working example with worker and Vue.js -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/app-gui/), [Live](https://gdal3.js.org/)
- Browser with Worker -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-browser-worker/), [Live](https://gdal3.js.org/examples/example-browser-worker/)
- Browser without Worker -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-browser/), [Live](https://gdal3.js.org/examples/example-browser/)
- Browser with Worker (Module) -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-module-browser-worker/), [Live](https://gdal3.js.org/examples/example-module-browser-worker/)
- Browser without Worker (Module) -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-module-browser/), [Live](https://gdal3.js.org/examples/example-module-browser/)
- Node.js -> [Code](https://github.com/bugra9/gdal3.js/blob/master/apps/example-node/)

## Development

Expand All @@ -210,8 +210,8 @@ GNU General Public License v3.0 or later
See [LICENSE](https://github.com/bugra9/gdal3.js/blob/master/LICENSE) to see the full text.

**Compiled with**
- [Emscripten 1.39.19](https://github.com/emscripten-core/emscripten) [(License)](https://github.com/emscripten-core/emscripten/blob/main/LICENSE)
- [Gdal 3.4.1](https://github.com/OSGeo/gdal) [(License)](https://github.com/OSGeo/gdal/blob/master/gdal/LICENSE.TXT)
- [Emscripten 3.1.7](https://github.com/emscripten-core/emscripten) [(License)](https://github.com/emscripten-core/emscripten/blob/main/LICENSE)
- [Gdal 3.4.2](https://github.com/OSGeo/gdal) [(License)](https://github.com/OSGeo/gdal/blob/master/gdal/LICENSE.TXT)
- [Proj 6.3.2](https://github.com/OSGeo/PROJ) [(License)](https://github.com/OSGeo/PROJ/blob/master/COPYING)
- [Geos 3.9.2](https://github.com/libgeos/geos) [(License)](https://github.com/libgeos/geos/blob/master/COPYING)
- [Spatialite 5.0.1](https://www.gaia-gis.it/fossil/libspatialite/index) [(License)](http://www.gnu.org/licenses/lgpl-2.1.html)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"nyc": "^15.1.0",
"puppeteer": "^13.0.1",
"push-dir": "^0.4.1",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"
"webpack": "^5.70.0",
"webpack-cli": "^4.9.2"
},
"dependencies": {
"detect-node": "^2.1.0",
Expand Down
Loading

0 comments on commit b65b4c8

Please sign in to comment.