Open epifanio opened 8 years ago
I studied some of the issues involved in having cesium integrated with GRASS .. the problem is complex and I'm not a js/python guro ... but AFAIK to have a bi-directional communication between javascript and grass-python (grass.script, pygrass, ...) IMHO the best (easiest) solution is to have an ipython (or jupyer, they are equivalent) kernel running and bind the grass environment to the ipython kernel. At this point will be possible to create an ipython-dashboard-template based on the ipython-widget (simple jquery objects like buttons, slider, dropdown menu connected to python functions) which will control the ipython-cesiumwidget. The alternative, more complex is to build our own tornado app which will bind js and python .. but this goes far away from my little knowledge.
After a grass-cesium connection is made using the ipython kernel, we are left with the terrain problem .. on how to render terrain in cesium from the grass data. One solution to this can be the adoption of the cesium terrain builder and the cesium terrain provider. Having this tool installed will allow us to run a "stager function" which will take as input the terrain data from GRASS, convert to cesium tiles and server them as url.
Of course this will involve the addition of a number of extra dependencies and IMHO its value is very remarcable if there is any intention from the GRASS devs to think of a GRASS web User Interface, not just embedding an HTML widget into the actual wxgui.
(i'll come back to this notes ASAP, adding more info and link to libraries and examples)
I'm switching (very slowly) to PyQt5. however, in WX WebView.RunScript
can be used to run js
code into the webview
page. This code can be easly connected to zoom to
, add layer
, mouse over
... functionalities.
This code is a patched version of the original GRASS WxGUI code to add: