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

MODIS vulnerable to forthcoming changes in sp and rgdal #76

Closed
rsbivand opened this issue Nov 16, 2019 · 0 comments
Closed

MODIS vulnerable to forthcoming changes in sp and rgdal #76

rsbivand opened this issue Nov 16, 2019 · 0 comments

Comments

@rsbivand
Copy link

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 check 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:

r-spatial/discuss#28

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

* checking examples ... ERROR
Running examples in ‘MODIS-Ex.R’ failed
The error most likely occurred in:

> ### Name: getTile
> ### Title: Get MODIS Tile ID(s)
> ### Aliases: getTile
> 
> ### ** Examples
> 
> ## Not run: 
> ##D # ex 1 ############
> ##D # interactive tile selection
> ##D getTile()
> ## End(Not run)
> 
> # ex 2: Spatial (taken from ?rgdal::readOGR) ############
> dsn <- system.file("vectors/Up.tab", package = "rgdal")[1]
> Up <- rgdal::readOGR(dsn, "Up")
Warning in OGRSpatialRef(dsn, layer, morphFromESRI = morphFromESRI, dumpSRS = dumpSRS) :
  Discarded datum South_American_Datum_1969 in CRS definition: +proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs,
 but +towgs84= values preserved
OGR data source with driver: MapInfo File 
Source: "/home/rsb/lib/r_libs/rgdal/vectors/Up.tab", layer: "Up"
with 81 features
It has 52 fields
Warning in OGRSpatialRef(dsn = dsn, layer = layer, morphFromESRI = morphFromESRI,  :
  Discarded datum South_American_Datum_1969 in CRS definition: +proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs,
 but +towgs84= values preserved
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum Unknown_based_on_Australian_Natl_S_Amer_1969_ellipsoid in CRS definition,
 but +towgs84= values preserved
> getTile(Up)
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum unknown in CRS definition
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum Unknown_based_on_WGS84_ellipsoid in CRS definition,
 but +towgs84= values preserved
Warning in RGEOSBinPredFunc(spgeom1, spgeom2, byid, func) :
  spgeom1 and spgeom2 have different proj4 strings
An object of class "MODISextent"
Slot "tile":
[1] "h18v17"

Slot "tileH":
[1] 18

Slot "tileV":
[1] 17

Slot "extent":
class      : Extent 
xmin       : -37.90078 
xmax       : -36.48352 
ymin       : -82.95643 
ymax       : -82.67047 

Slot "system":
[1] "MODIS"

Slot "target":
$outProj
[1] "+proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs"

$extent
class      : Extent 
xmin       : 598047.2 
xmax       : 619791.4 
ymin       : 781652.7 
ymax       : 812944.4 

$pixelSize
NULL


> 
> # ex 3: sf ############
> ifl <- system.file("shape/nc.shp", package = "sf")
> nc <- sf::st_read(ifl, quiet = TRUE)
> getTile(nc)
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum unknown in CRS definition
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
Error in .local(x, y, returnList, fn, ...) : 
  identicalCRS(x, y) is not TRUE
Calls: getTile -> [ -> [ -> over -> over -> .local -> stopifnot
Execution halted
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