ropensci / MODIStsp

An "R" package for automatic download and preprocessing of MODIS Land Products Time Series
https://docs.ropensci.org/MODIStsp
GNU General Public License v3.0
155 stars 50 forks source link

MODIStsp vulnerable to forthcoming changes in sp and rgdal #185

Closed rsbivand closed 4 years ago

rsbivand commented 4 years ago

Running revdep checks for current rgdal on R-Forge - see:

https://stat.ethz.ch/pipermail/r-sig-geo/2019-November/027801.html

shows the errors in the attached test log, related to use of PROJ&/GDAL3 and required changes to sp and rgdal. If useful find a regerence to a docker image in this thread:

https://github.com/r-spatial/discuss/issues/28

Changes will occur quite fast, and packages need to be prepared.


R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> Sys.setenv("R_TESTS" = "")
> library(httptest)
Loading required package: testthat
> test_check("MODIStsp")
Loading required package: MODIStsp
R session is headless; GTK+ not initialized.

(R:303581): Gtk-WARNING **: 14:18:20.897: gtk_disable_setlocale() must be called before gtk_init()
R session is headless; GTK+ not initialized.
── 1. Failure: check_proj4string works as expected (@test_check_proj4string.R#11
check_proj4string(sp::CRS("+init=epsg:32632")) not equal to "+init=epsg:32632 +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0".
1/1 mismatches
x[1]: "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0
x[1]: ,0,0"
y[1]: "+init=epsg:32632 +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps
y[1]: =WGS84 +towgs84=0,0,0"

proj_create: crs not found
proj_create: crs not found
proj_create: crs not found
proj_create: crs not found
══ testthat results  ═══════════════════════════════════════════════════════════
[ OK: 26 | SKIPPED: 14 | WARNINGS: 0 | FAILED: 1 ]
1. Failure: check_proj4string works as expected (@test_check_proj4string.R#11) 

Error: testthat unit tests failed
Execution halted
lbusett commented 4 years ago

Currently working on this! Hopefully I'll be able to fix by this week.

rsbivand commented 4 years ago

Problem still present in rgdal devel, to be released shortly. If you need help, please create a tarball for me to test. I cannot see how remotes can just give me the tarball from github. Attach here (inside zip maybe) or attach to roger.bivand@nhh.no.

lbusett commented 4 years ago

@rsbivand Yes, I know, sorry... I have an almost done "conversion" towards use of sf and WKTs here:

https://github.com/ropensci/MODIStsp/tree/feature/gdal3

I hope I'll manage to close it within the week.

lbusett commented 4 years ago

@rsbivand I am making progress in the "transition" to sf, but I stumbled on a couple of issues introduced in recent sf::gdal_utils() versions that I am still trying to iron out. Since I'd like to avoid if possible to adapt the package to newer rgdal/sp justto wait to be able to adapt it to sf, I'd like to try to see if newer rgdal only introduces further problems besides that failing test (in which case I could simply disable it).

Could you kindly remind me which rgdal/sp repos and versions I should use to replicate your testing system?

rsbivand commented 4 years ago

sp from rsbivand/sp, rgdal from R-Forge, PROJ 6+ (now 7.0.0 is current) GDAL 3.0.4. Now becoming urgent, I'm afraid.

lbusett commented 4 years ago

@rsbivand Luckily, hopefully yesterday I completed the "switch". Dependency from sp/rgdal/rgeos/gdalUtilities will be dropped in version 1.4.0 in favor of sf + gdalUtils I am currently preparing the CRAN release (struggling as always with CRAN tests, but I think I am very near.

lbusett commented 4 years ago

(sorry for being slow on this...)

lbusett commented 4 years ago

MODIStsp v1.4.0 is on CRAN now, so I am closing the issue. @rsbivand: thanks for your advice (and patience) on this!