-
Notifications
You must be signed in to change notification settings - Fork 506
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
Support for new spatial data classes #728
Comments
Hi @rhijmans! That would be really great indeed. Can you clarify what you mean by "vector data from |
My bad, I missed that as I was reading the docs --- but it is clearly there. |
And, by the way, I think you set me on the path towards terra (C++ with some R around it) with your contributions to make |
I second the request from @rhijmans: supporting "terra" objects in leaflet would help all those that work with geospatial data. |
Dear colleagues, any news on implementing "SpatRaster" input for
I guess the analogous could provisionally be done for "SpatRaster" too ( |
@jcheng5: I would happily create a PR if you are interested. |
@rhijmans That would be fantastic, thank you |
With my fork, that you can install with:
I can now do
I would appreciate it if any of you could test this a bit more, and let me know. |
I've tested it with a few different 'leaflet' scripts, combining a variety of layers of different classes (including "Spatial*", "SpatVector", "RasterLayer", "SpatRaster"), and it seems to work seamlessly! Also, 'terra' layers plot visibly faster than their "Spatial*" versions (cf. Uganda in the above example). Thank you so much, Robert! |
Forgot to mention I'm on Linux Mint 19.3 Cinnamon. I also deployed a Shiny app with 'leaflet' maps at https://ambiogeo.shinyapps.io/atlasmampor/, using @rhijmans's fork and a few 'SpatVector' layers, with no problems so far. |
This has now been merged into the main branch. A follow-up PR (currently pending, #808) adds support for color-tables and RGB rasters. See my fork at with these examples
|
It would be great if
addRasterImage
could support forSpatRaster
objects from the terra package (a replacement for theraster
package). It should perform better asterra::project
is much faster thanraster::projectRaster
. It also should be easy to do, the interface ofterra
is very similar to that ofraster
. It would also be great if theleaflet
method could support vector data fromsf
andSpatVector
fromterra
.The text was updated successfully, but these errors were encountered: