Opened 2 years ago
Last modified 6 months ago
#2405 new enhancement
Provide tmap as a cartographic library in R
Reported by: | bakaniko | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | OSGeoLive17.0 |
Component: | OSGeoLive | Keywords: | R |
Cc: | Nick Bearman, osgeolive@… |
Description
At FOSS4G 2022 community sprint, Nick suggested to add tmap in the ISO as a cartographic library. So I investigated a bit.
running install.packages("tmap")
show that tmap as some dependencies like leaflet and stars that does not install.
I managed to fix the leaflet dependencies issues with sudo apt install png
.
For the stars issues, it is more tricky. It does need the lwgeom.
I managed to install with sudo apt install r-cran-lwgeom
But still go errors:
Error: package ‘sf’ 1.0.6 was found, but >= 1.0.8 is required by ‘stars’
so it tries to install sf 1.0.8 but it can't install it due to missing access to gdal-config
:
configure: error: gdal-config not found or not executable.
`ERROR: configuration failed for package ‘sf’
as suggested in stackoverflow, I tried to install libgdal-dev
to get that command. https://stackoverflow.com/questions/12141422/error-gdal-config-not-found-while-installing-r-dependent-packages-whereas-gdal
It requires 352 MB of additional disk space so I wonder if it worths it. Maybe there is some other way to avoid that.
That might be also a problem with next version
Change History (7)
comment:1 by , 2 years ago
Cc: | added |
---|
comment:2 by , 2 years ago
comment:3 by , 2 years ago
Thanks kalxas.
libgdal-dev seems to be used in what I would consider to be 'not development' versions of sf / stars, I'm not sure whether this is intentional or not.
I think it would be ideal to include in the VM version please.
comment:4 by , 2 years ago
Nick, I think you misunderstand what a *-dev library is. -dev is an indicator of source files headers required for compilation of C/C++ code. Once sf is installed, by compiling from source the libgdal-dev can be safely removed.
So it's a little trickier to calculate the actual size of adding sf and tmap (did we not have sf already?).
comment:5 by , 2 years ago
Thanks wildintellect - you are correct, I did not understand about -dev libraries, thanks for the explanation. So, if I understood correctly, we can install sf & tmap, compile as required, then remove libgdal-dev and all will be good.
Yes - you did have sf already, but an older version (1.0.7 rather than 1.0.8 I believe from memory).
I'm not likely to be able to try this out for a few weeks, but I will give it a go when I can. @bakaniko if you have a chance to try this, please do.
Many thanks to you both!
comment:6 by , 23 months ago
Milestone: | OSGeoLive15.0 → OSGeoLive16.0 |
---|
Ticket retargeted after milestone closed
comment:7 by , 6 months ago
Milestone: | OSGeoLive16.0 → OSGeoLive17.0 |
---|
Ticket retargeted after milestone closed
We explicitly remove all -dev libraries from the iso. We can consider adding this library in the VM only.