Git Product home page Git Product logo

cesiumpy's People

Contributors

sinhrks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cesiumpy's Issues

Example from README gives Google warning and shows nothing

I tried to run this on a recent version of Jupyter notebook:

import cesiumpy

v = cesiumpy.Viewer()

v.entities.add(cesiumpy.Box(dimensions=(40e4, 30e4, 50e4),
                            material=cesiumpy.color.RED, position=(-120, 40, 0)))
v

But I get this warning:

/home/juanlu/.pyenv/versions/3.7.4/envs/mbp37/lib/python3.7/site-packages/cesiumpy/extension/geocode.py:12: UserWarning: Since July 2018 Google requires each request to have an API key. Pass a valid `api_key` to GoogleV3 geocoder to hide this warning. See https://developers.google.com/maps/documentation/geocoding/usage-and-billing
  _GEOCODER = GoogleV3()

a JavaScript error message:

ReferenceError: Cesium is not defined

and a blank recangle:

Screenshot from 2019-10-11 11-49-25

Mixed Content Loading Problem in Chrome

Running the example on an HTTPS Ipython Server leads to this problem in Chrome and probably other browsers.

Mixed Content: The page at 'https://...ipynb' was loaded over HTTPS, but requested an insecure stylesheet 'http://cesiumjs.org/Cesium/Build/Cesium/Widgets/widgets.css'. This request has been blocked; the content must be served over HTTPS.

Basically we should always be loading content over HTTPS as that means it works for both HTTP and HTTPS sites.

Tutorial does not work: you need to call CesiumWidget() first, then Viewer()

When trying to follow the tutorial within a Jupyter notebook, I noticed that I get an error:

import cesiumpy

v = cesiumpy.Viewer()
b = cesiumpy.Box(dimensions=(40e4, 30e4, 50e4), material=cesiumpy.color.RED, position=[-120, 40, 0])
v.entities.add(b)

Javascript error adding output!
ReferenceError: Cesium is not defined
See your browser Javascript console for more details.

If I do this instead:

import cesiumpy

v = cesiumpy.CesiumWidget()

v

Then I get the nice globe. If I now call the first code in a new cell once again, it will work just fine. Seems to me that the Viewer() method is not loading cesium.js correctly.

Using Firfox on Ubuntu 16.04.

See screenshots.
cesium1
cesium2

cesiumpy is great but missing all reference to time animations

Hi there doesn't seem to be any support for time based animations except loading in a czml file.

So entities don't seem to have the availability, epoch properties I don't see support for position data with time_step, lng, lat, height format either ?

Maybe they are called something else I see a reference to Clock class maybe that is what I need.

EHN: CZML as python list

I think it could be useful to have the full czml protocol accessible via python data structure directly (instead of via uri), useful for programmatic generation of scenarios.

so one can write like:

simple_czml =[
{ "id":"document", "version":"1.0" } ,
{
"id": "InternationalSpaceStation",
"position":

...

and then somehow send this to the cesiumjs library

Flyto or zoomto to an entity or entities

On cesium you can normally add an entity and fly to that entity:

            var wyoming = viewer.entities.add({
                name: 'Wyoming',
                // polygon :: Cesium.PolygonGraphics
                polygon: {
                    // polygon longitude and latitude (not totally accurate)
                    hierarchy: Cesium.Cartesian3.fromDegreesArray([
                        -109.080842, 45.002073,
                        -105.91517,  45.002073,
                        -104.058488, 44.996596,
                        -104.053011, 43.002989,
                        -104.053011, 41.003906,
                        -105.728954, 40.998429,
                        -107.919731, 41.003906,
                        -109.04798,  40.998429,
                        -111.047063, 40.998429,
                        -111.047063, 42.000709,
                        -111.047063, 44.476286,
                        -111.05254,  45.002073
                    ]),
                    material: Cesium.Color.RED.withAlpha(0.5)
                }
            });

            viewer.flyTo(wyoming).then(function(result){
                if (result) {
                    viewer.selectedEntity = wyoming;
                }
            });

I just tried this with an entity I added via ob = v.dataSources.add() but I wasn't able run v.camera.flyTo(ob), it didn't fly anywhere.

How can this be done? Also I'm a bit confused as to how Cesium's Javascript API maps to the Python object API, some things are placed in different areas.

Project Status

We are interested in potentially building an extension for our GeoViews library on top of cesiumpy. I've started building a prototype and that all went fairly smoothly but in doing so I've noticed that development for cesiumpy has basically stalled and some APIs have diverged from the latest CesiumJS.

Therefore I wondering whether this project is basically abandoned or whether there is some hope of continued development? If you have given up active maintenance it would be good to know: 1) would you hand over maintenance to someone else and 2) how much work do you think it would be to update cesiumpy to work smoothly with the latest version of CesiumJS?

ENH: Save a static image

Hi @sinhrks,
Thank you for providing this Cesium wrapper. Thank you for making this available, it looks really promising.

I was wondering whether it is possible to save a static image of the js-viewer? There must be some buffer which I could catch and save, but I couldn't find it.

The goal is to make a movie and to zoom in on a particular site.

Any help/pointers would be greatly appreciated.

Kind regards,
Bas

Cesium Widget gets bigger on every mouse click

import cesiumpy
v = cesiumpy.CesiumWidget()
v

I now get a widget with a globe on it. However, every time I click the cell output will get a bit bigger. If I hit some keys, the cell output also grows bigger vertically. This seems to affect all widget cells and not just the current cell that I am clicking on.

v.to_html() shows empty space (without the globe)

I'm testing cesiumpy both in Jupyter notebook and in html mode. It works as expected in Jupyter notebook after installing ipywidgets (pip install ipywidgets).

In html, however, the viewer loads but there is only empty space (without the globe). What can I do to fix it.
I wrote a file index.html with the v.to_html() method.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.