Skip to content

WebGL Earth

3 messages · Richard Barnes, Tim Appelhans, Michael Sumner

#
Richard,

great idea! We have a 'Hello World' Cesium htmlwidget which has never 
seen any further progress.

https://github.com/environmentalinformatics-marburg/cesium

May I ask what the added value of webglearth over leaflet is (apart from 
a fancy spinning globe)? Cesium has native space-time support so would 
really add something that isn't (yet) accessible from R. Would you 
consider taking on a grander challenge working on cesium implementation? 
If so, we could move the above repo to r-spatial at github and trun it 
into a group effort.

Anyway, just some thoughts...

Tim
On 18.04.2017 03:50, Richard Barnes wrote:

  
    
#
HI Richard,
On Tue, 18 Apr 2017 at 11:50 Richard Barnes <rbarnes at umn.edu> wrote:

            
I put this together to put various R data structures into forms ready for
rgl or WebGL:

https://github.com/r-gris/rangl

The pattern is

## convert to table entities
x <- rangl(object)

## plot in rgl form and return the rgl structure (list of arrays)
rg <- plot(x)

## optionally convert to geocentric coordinates rather than the native CRS
rg <- plot(globe(x))

 The geocentric step is merely transformation on the unique vertices after
decomposition to primitiveslike, so it can be done independent of any other
structure.

This is how I would transfer data to WebGL, with optimizations as needed. I
wish we had a general central core with primitives like this but ultimately
it's just tables and indexing so pretty easy to do.

Cheers, Mike.


Just wanted to inquire as to whether anyone's already built such a thing