Open cehanagan opened 3 years ago
Follow-up: for now we @UNAVCO are making use of an existing JS port of the Geoid Height calculations written by Kim Vandry:
Hello! We have not made any attempts to compile Geoid functions from GeographicLib. It looks like one tricky piece would be getting the Geoid dataset cached, because GeographicLib loads datasets from the file system. Emscripten provides a few options to do this:
Synchronous Virtual XHR seems like a good approach because the work is all done in WebAssembly and datasets are only loaded as needed. For larger sets like egm2008-1
, it might be best to use the File System API and make a File accessible in a Worker so the entire set doesn't need to be downloaded and loaded in browser memory.
Hi! I would like to state an initial disclaimer that I am new to C++ and JavaScript, as my background is in geophysics, but I am attempting to create a tool in an Observable Notebook (which runs on JavaScript) that computes the height above the user-specified geoid given a position (lat, lon, height) above the reference ellipsoid (WGS84 system). This utility is available through the command line GeoidEval tool of GeographicLib, but I am having trouble getting it compiled with emscripten. I was wondering if any attempts have been made to produce a webassembly friendly version of this particular geographiclib tool, similar to what you have done with the geodesic tools? Or, alternatively, whether you have a sense of if this is feasible using similar methods that you have already implemented?