running a python script in sandcastle

1.Say we have a number of python scripts that we would like to use to manipulate data. What would be the easiest way to get those to run in the sandcastle code.

  1. Ipython notebooks are are already very widely used in the scientific community, would it be easier to integrate a cesium widget into an ipython notebook or to expand sandcastle to allow you to run python.

  2. Are there any plans with regard to python integration with cesium not covered by answers to 1 or 2 above?

You can setup a python http server. Run your python scripts for every GET method, and write the result back to http response. Use '/proxy/' module to solve cross domain issue.

I find this an interesting area too.

Have a look at the javascript - python interaction possible in ipython notebook:

One way to do it is to embedd the viewer as a HTML page, and use a czml file for the information transfer.

in a cell:

from IPython.core.display import HTML

HTML(’<iframe src= width=700 height=650>’)

I have placed by cesium folder under the .ipython\profile_default\static\js folder, which also should contain a file custom.js (can be empty). This way the ipython javascript can access the cesium library.

But the best would likely be to have it as a javascript widget, enable direct interaction with the cesium without the need of th czml file.


I managed to get the embeddment of cesium viewer in ipython notebook to work (at least rudimentary). Looks very neat I think.

A html version of the notebook is available at the link below, cesium not visible in the export though.

One issue I had was that it seems like the and localhost is not transparent. Chrome seems to require the localhost URL for the notebook for the embeddment to work.




i was integrating Cesium in a notebook as well :slight_smile:

in my use case i’m sung some GIS app (mix of GRASS, R and GDAL) to generate the data

then a simple HTML template to visualize the results with Cesium. (in this case i’m uploading thehtml on a web server where i’ve stored the Cesium library)

the next Google Summer of Code i’m interested in mentoring the development of a “GEO-Cell” for the ipython notebook …

if anyone is interested please drop me a mail, we can try to find the needed resources between the IPYthon, OSGeo and Cesium Communities