wasm-gdal-sandbox

GDAL test harness for WebAssembly build

https://github.com/wonder-sk/wasm-gdal-sandbox

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    24 of 532 committers (4.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.6%) to scientific vocabulary

Keywords from Contributors

geospatial-data gdal wms wcs wfs web-mapping ogc-api ogc ogc-services foss4g
Last synced: 11 months ago · JSON representation

Repository

GDAL test harness for WebAssembly build

Basic Info
  • Host: GitHub
  • Owner: wonder-sk
  • License: other
  • Language: C++
  • Default Branch: vsicurl-fetch-api
  • Size: 301 MB
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • Open Issues: 5
  • Releases: 0
Created almost 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Citation Security Governance

README.md

GDAL test harness for WebAssembly build

This is a clone of GDAL repository for development and testing of patches specific to WebAssembly builds, for use in qgis-js.

  • All dependencies are coming from vcpkg (like with qgis-js)
  • Using custom vcpkg triplet to support multi-threading and wasm exceptions
  • There's an extra executable to test modifications (test_cog_read) with a sample COG file

Custom WebAssembly patches:

  • Vsicurl implemented using emscripten's fetch API (proof of concept with many to-dos, just enough to read remote COGs)
    • It would be nice if we would not need to patch vsicurl, but:
      1. libcurl by itself does not have a backend for emscripten, and it seems it does not have any plans for it
      2. one day Emscripten may get libcurl API support: https://github.com/emscripten-core/emscripten/issues/3270 (opened since 2015)
  • Avoid warnings in console on CPLGetUsablePhysicalRAM() call ("unsupported syscall: _syscallprlimit64")

Using this repo

Clone the repo at this branch:

git clone https://github.com/wonder-sk/wasm-gdal-sandbox.git --branch vsicurl-fetch-api

Get emscripten env variables loaded:

source /home/martin/inst/emsdk/emsdk_env.sh

Configure the build: VCPKG_DIR=/home/martin/inst/vcpkg \ EMSCRIPTEN_DIR=/home/martin/inst/emsdk/upstream/emscripten \ ${VCPKG_DIR}/downloads/tools/cmake-3.27.1-linux/cmake-3.27.1-linux-x86_64/bin/cmake \ -B build-wasm -S . -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake \ -DVCPKG_TARGET_TRIPLET=wasm32-emscripten-threads \ -DVCPKG_OVERLAY_TRIPLETS=./vcpkg-triplets \ -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${PWD}/vcpkg-triplets/toolchain.cmake \ -DBUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=OFF \ -DBUILD_APPS=OFF \ -DGDAL_USE_HDF5=OFF \ -DGDAL_ENABLE_DRIVER_HDF5=OFF \ -DGDAL_USE_ICONV=OFF \ -DGDAL_ENABLE_DRIVER_JPEG=OFF \ -DGDAL_ENABLE_DRIVER_MRF=OFF \ -DGDAL_USE_PNG=OFF \ -DGDAL_ENABLE_DRIVER_PNG=OFF \ -DCMAKE_BUILD_TYPE=Debug

Build GDAL library and the test executable: cmake --build build-wasm --target test_cog_read

Testing

To test remote COG fetching, we need a HTTP server that support range requests and cross-origin resource sharing.

cd test-cog/data npm install http-server

Run the server in the "data" directory:

npx http-server --cors

Finally run the test executable (in the repo root dir):

emrun build-wasm/test-cog/test_cog_read.html

Notes

JPG, PNG, MRF drivers are disabled in the configuration because of some clash of setjmp and exception handling in LLVM. Iconv was also throwing some compilation error. HDF5 was also causing compilation issues (forgotten what exactly).

Owner

  • Name: Martin Dobias
  • Login: wonder-sk
  • Kind: user
  • Location: Earth
  • Company: @lutraconsulting

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 48,948
  • Total Committers: 532
  • Avg Commits per committer: 92.008
  • Development Distribution Score (DDS): 0.496
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Even Rouault e****t@m****g 24,673
Frank Warmerdam w****m@p****m 11,534
Kurt Schwehr s****r@g****m 3,410
Andrey Kiselev d****n@a****u 1,322
Mateusz Loskot m****z@l****t 802
Howard Butler h****c@g****m 785
Ari Jolma a****a@t****i 534
Ivan Lucena i****a@p****m 410
Tamas Szekeres s****t@g****m 406
Kevin Ruland k****d@k****u 239
Daniel Baston d****n@g****m 225
Even Rouault reformatting bot n****l@s****m 199
Nyall Dawson n****n@g****m 186
Etienne Tourigny e****v@g****m 175
Martin Landa l****n@g****m 170
Ben Elliston b****n@a****u 160
Idan Miara i****n@m****m 160
Lucian Plesea L****a@e****m 131
Dmitry Baryshnikov p****u 128
Chaitanya Kumar c****h@g****m 122
Daniel Morissette d****e@m****m 118
Ari Jolma a****a@g****m 104
Alan Thomas a****s@t****u 90
Pirmin Kalberer p****a@s****h 88
Alessandro Amici a****i@t****t 88
Kai Pastor d****t@d****e 85
drons d****s@l****u 85
Charles Savageruby c****s@s****m 75
Brian Case r****h@w****g 71
Kyle Shannon k****n@g****m 70
and 502 more...

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels