GithubHelp home page GithubHelp logo

domsooch / cesium Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spacecurve/cesium

0.0 2.0 0.0 188.16 MB

WebGL virtual globe and map engine

Home Page: cesiumjs.org

License: Other

CSS 5.75% JavaScript 82.56% HTML 7.26% GLSL 0.82% Shell 0.06% Erlang 0.01% Batchfile 0.13% Perl 2.04% Python 0.02% XSLT 1.34%

cesium's Introduction

Cesium with Data Streaming

This code is forked from Cesium by Analytical Graphics, Inc. (AGI).

This Cesium build adds a GeometryBuffer object you can use to queue points, lines, and polygons onto a scene, and flush these visual elements to the GPU in a single operation. If you use a timer to regularly flush queued elements, data can be rendered as it arrives.

These instructions describe the steps you will take to use this modified Cesium build with sample data on the SpaceCurve QuickStart Virtual Machine.

Dependencies

  • Before following these instructions, be sure you installed sample data by following the instructions in the Add Sample Data section of QuickStart for SpaceCurve Virtual Machine.

  • This example requires a browser that includes WebGL. A browser that runs Cesium Demos should also run this example.

Run Node.js to host Cesium

Our Virtual Machine includes Node.js to run Cesium. To boot the Virtual Machine and log in, follow steps in QuickStart for SpaceCurve Virtual Machine. Then follow these steps to start the Node.js server:

  1. In the Virtual Machine, double-click the Terminal icon at the top-center of the desktop, next to the Firefox icon.

  2. In the terminal window, enter these commands:

     $ cd ~/cesium
     $ node server.js 5555
    

Run Example in Client Browser

You can use a browser-based example in the SpaceCurve VM to show data as it arrives in the browser.

In this example, the SpaceCurve VM operates as a server. Follow these steps to view the example:

  1. On the desktop within the SpaceCurve VM, double-click the Terminal icon. A terminal window opens.

  2. In the terminal window, enter:

     ifconfig | grep 'inet addr'
    
  3. Using the mouse, select the first internet address you see. The internet address is four numbers separated by periods. Yours will look something like 192.168.xx.xx.

  4. From the menu, click Edit, and click Copy.

  5. In a browser on your host computer (not inside the VM), paste the internet address into the location bar, add :5555 to the address, and press the return key. The address in the browser will look similar to this:

     192.168.11.11:5555
    

Query data in the Example

This example lets you query data from the SpaceCurve System. If the data contains geospatial properties, this example will render its points or polygons onto the map. This example uses a timer to flush the GeometryBuffer frequently, while data streams from the SpaceCurve System into the browser.

Enter one of these queries into the Manual Query field. You will see points or polygons appear on the map of the United States. Note that visual rendering begins before all of the data has arrived.

select * from schema.us_counties;
select * FROM schema.us_cities where "properties"."NAME" LIKE 'S%' ;   
select * from schema.us_counties where "properties"."POP2000" > 10000 ;  

This example shows points as dots, and shades polygons according to their POP2000 property value. In this example, you can zoom into and out of the map using the scroll wheel on the mouse.

cesium's People

Contributors

abwood avatar akosmaroy avatar andr3nun3s avatar ayudhdas avatar bagnell avatar balefrost avatar chris-cooper avatar cmorse avatar dignative avatar emackey avatar evax avatar flinsalata avatar fstoner avatar gbeatty avatar gcebelieu avatar kring avatar kristiancalhoun avatar mdunkel avatar mmacaula avatar mramato avatar mrmattf avatar nobelium avatar ognjenb avatar pjcozzi avatar ralith avatar raviagrwl420 avatar rcpage3 avatar ryanpepley avatar shunter avatar vicb avatar

Watchers

 avatar  avatar

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.