[R-sig-Geo] WebGL Earth
Michael Sumner
mdsumner at gmail.com
Tue Apr 18 08:54:44 CEST 2017
HI Richard,
On Tue, 18 Apr 2017 at 11:50 Richard Barnes <rbarnes at umn.edu> wrote:
> I'm thinking about cobbling together a little package to show data in
> WebGL Earth (http://www.webglearth.org/), similar to Leaflet for R
> (https://rstudio.github.io/leaflet/).
>
>
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
> or at work on it?
>
> Best regards,
> Richard
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list