-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using vsicurl in node / browser ? #67
Comments
Hi @vsharma-next, I am glad you love this work, thank you.
Alternatively, I can release a new version by making the Emscripten Filesystem API public so you can use the following code: const data = await fetch('http://127.0.0.1:8080/data/simple-polygon-line-point.tif').then(response => response.arrayBuffer());
Gdal.FS.writeFile('/input/simple-polygon-line-point.tif', new Int8Array(data));
const result = await Gdal.open('/input/simple-polygon-line-point.tif'); Would that work for you? |
This is a great idea. I think given that OPFS will become more and more prevalent, this API will come in handy. |
@vsharma-next, I exported the Module from Emscripten to version 2.8.0. Can you try the code below with this version? const Gdal = await initGdalJs();
const data = await fetch('https://gdal3.js.org/test/data/simple-polygon-line-point.tif').then(response => response.arrayBuffer());
Gdal.Module.FS.writeFile('/input/simple-polygon-line-point.tif', new Int8Array(data));
const result = await Gdal.open('/input/simple-polygon-line-point.tif');
console.log(result); |
Hello. Love this work. I think this might be one of those watershed experiments that will have a big impact.
Q: Is vsicurl supported ? I would love to replace geotiff.js dependency and just use gdal's vsicurl. This is what I have tried.
code :
result:
Since @rouault seems to also be following this effort, perhaps he can comment as well ?
I have tried it in the browser and it does not work there either - perhaps not too much of a surprise will all the sandbox/security stuff.
Any suggestions ?
Thanks !
The text was updated successfully, but these errors were encountered: