Opened 21 months ago

Last modified 17 months ago

#2405 new enhancement

Provide tmap as a cartographic library in R

Reported by: bakaniko Owned by: osgeolive@…
Priority: normal Milestone: OSGeoLive16.0
Component: OSGeoLive Keywords: R
Cc: Nick Bearman, osgeolive@…


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.

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 (6)

comment:1 by kalxas, 21 months ago

Cc: osgeolive@… added

comment:2 by kalxas, 21 months ago

We explicitly remove all -dev libraries from the iso. We can consider adding this library in the VM only.

comment:3 by Nick Bearman, 21 months 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 wildintellect, 21 months 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 Nick Bearman, 20 months 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 kalxas, 17 months ago

Milestone: OSGeoLive15.0OSGeoLive16.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.