Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental implementation of an R cesium package #3

Open
goergen95 opened this issue Aug 24, 2023 · 2 comments
Open

Experimental implementation of an R cesium package #3

goergen95 opened this issue Aug 24, 2023 · 2 comments

Comments

@goergen95
Copy link

Hi @tim-salabim,

I have a working experimental implementation of an R {cesium} package ready here.
This is highly experimental, expect most things you would like to do not to work properly! ;)

The documentation is only basic, however, I prepared several usecases
which showcase some applications. Note, these require to download some data which I could not include
in the repository due to size constrains. Running renv::hydrate() from the project directory,
should install all required dependencies to run the usecases.

The JavaScript binding currently is pretty slim. The main reason for this is my inability to write proper JavaScript code.
The package is basically an sf-to-CZML converter, which can easily be rendered on a globe by calling the
respective CesiumJS method.

CZML is a JSON-based specification to describe space-time data. To me, it seems like quite an interesting format specification
which is not an official OGC standard, yet. My understanding is that AGI might try to move it into that direction.

In the README you will find a small overview of the things that are already implemented and what is missing.

Briefly, with cesium we can:

  • add points,
  • add markers,
  • add labels,
  • add lines,
  • add polygons,
  • add rasters,

to an interactive globe with the possibility to include a temporal dimension and
fine-control over properties such as color or size, among other things.
Most importantly, methods for legends and toggling off layers are missing.

Internally, I used sf and stars for handling spatial data.
Proper normalization methods for other spatial data classes, e.g. terra, are yet to be developed.

I mainly have two reasons to open this issue:

  • first, I would really appreciate some feedback on the initial design of the R interface.
    In the backend, I liberally copied methods from the leaflet package and also
    mimicked its user-facing API. I am specifically interested in feedback on the handling
    of space-time data. After some initial experiments with, e.g. stars and cubble,
    I opted for sf for geometries to be able to accommodate irregular time-series, but
    maybe there are better options out there?

  • second, I am looking for someone proficient in coding JavaScript interested in co-developing
    the package. I imagine setting up some initial infrastructure like a layer manager and re-usable
    methods that make it easy to extend the functionality upon feature-requests. Setting
    this up in a proper way is above my abilities, but I can imagine to also contribute
    to the maintenance of the JS code base once it has matured.

Of course, any kind of feedback going beyond those items is appreciated!

Best,
Darius.

@tim-salabim
Copy link
Member

Hi @goergen95, this is great work! I have yet to properly try it out, but I am impressed already! Regarding your two questions:

I am specifically interested in feedback on the handling
of space-time data. After some initial experiments with, e.g. stars and cubble,
I opted for sf for geometries to be able to accommodate irregular time-series, but
maybe there are better options out there?

Maybe @edzer has some thoughts here, there is a sftime package, but I am not sure how mature it is

I imagine setting up some initial infrastructure like a layer manager and re-usable
methods that make it easy to extend the functionality upon feature-requests. Setting
this up in a proper way is above my abilities

Same here unfortunately... Maybe an annoucement on Mastodon or r-sig-geo may spark someones interest?

@goergen95
Copy link
Author

Thanks for that initial feedback! Hope you can try it out soon.
We could also think about reviving r-spatial/discuss#29 since there was some initial interest in developing a cesium R package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants