From edzer.pebesma at uni-muenster.de Mon Mar 9 08:37:46 2015 From: edzer.pebesma at uni-muenster.de (Edzer Pebesma) Date: Mon, 09 Mar 2015 08:37:46 +0100 Subject: [Rspatial-devel] rgeos exportClasses SpatialLinesNULL Message-ID: <54FD4DCA.9040907@uni-muenster.de> A package that imports (anything from) rgeos and declares MyClass1 <- setClass('MyClass1', contains = c('SpatialLines')) MyClass2 <- setClass('MyClass2', contains = c('MyClass1')) keeps getting the warning: "Found the following significant warnings: Warning: class "SpatialLinesNULL" is defined (with package slot ?rgeos?) but no metadata object found to revise subclass information---not exported? Making a copy in package ?minweSpatialNULL?" See http://stackoverflow.com/questions/28871632/how-to-resolve-warning-messages-metadata-object-not-found-spatiallinesnull-cla I don't understand why this is, but so do I not understand ClassUnions. I'm resolving this by having rgeos exportClass SpatialLinesNULL and all the other *NULL classes. (Having it not exportClass SpatialCollections did not resolve the problem either). -- Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster, Heisenbergstra?e 2, 48149 M?nster, Germany; +49 251 83 33081 Journal of Statistical Software: http://www.jstatsoft.org/ Computers & Geosciences: http://elsevier.com/locate/cageo/ Spatial Statistics Society http://www.spatialstatistics.info -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: OpenPGP digital signature URL: From edzer.pebesma at uni-muenster.de Mon Mar 9 10:33:02 2015 From: edzer.pebesma at uni-muenster.de (Edzer Pebesma) Date: Mon, 09 Mar 2015 10:33:02 +0100 Subject: [Rspatial-devel] CRS("+proj=longlat +datum=wgs84") Message-ID: <54FD68CE.5070804@uni-muenster.de> up to now, CRS("+proj=longlat +datum=wgs84") would be accepted when sp is loaded, but rgdal is not. I modified this into quietly checking whether rgdal is available: rgdal::checkCRSArgs used to be checked only when if (!is.na(uprojargs) && "rgdal" %in% .packages()) { I changed this into: if (!is.na(uprojargs) && requireNamespace("rgdal", quietly = TRUE)) { which leads to the following behaviour with only sp loaded: > CRS("+proj=longlat +datum=wgs84") Error in CRS("+proj=longlat +datum=wgs84") : unknown elliptical parameter name I think this is good, although it currently breaks packages HSAUR3 and MapGAM. Shall I contact its authors? -- Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster, Heisenbergstra?e 2, 48149 M?nster, Germany; +49 251 83 33081 Journal of Statistical Software: http://www.jstatsoft.org/ Computers & Geosciences: http://elsevier.com/locate/cageo/ Spatial Statistics Society http://www.spatialstatistics.info -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: OpenPGP digital signature URL: From Roger.Bivand at nhh.no Mon Mar 9 10:41:29 2015 From: Roger.Bivand at nhh.no (Roger Bivand) Date: Mon, 9 Mar 2015 10:41:29 +0100 Subject: [Rspatial-devel] CRS("+proj=longlat +datum=wgs84") In-Reply-To: <54FD68CE.5070804@uni-muenster.de> References: <54FD68CE.5070804@uni-muenster.de> Message-ID: On Mon, 9 Mar 2015, Edzer Pebesma wrote: > up to now, CRS("+proj=longlat +datum=wgs84") would be accepted when sp > is loaded, but rgdal is not. I modified this into quietly checking > whether rgdal is available: > > rgdal::checkCRSArgs used to be checked only when > > if (!is.na(uprojargs) && "rgdal" %in% .packages()) { > > I changed this into: > > if (!is.na(uprojargs) && requireNamespace("rgdal", quietly = TRUE)) { > > which leads to the following behaviour with only sp loaded: > >> CRS("+proj=longlat +datum=wgs84") > Error in CRS("+proj=longlat +datum=wgs84") : > unknown elliptical parameter name > > I think this is good, although it currently breaks packages HSAUR3 and > MapGAM. Shall I contact its authors? Yes, but note that I'm making changes in rgdal to accommodate forthcoming PROJ 4.9.1. However, lower case wgs84 has never been OK, right? Roger > -- Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 91 00 e-mail: Roger.Bivand at nhh.no From Roger.Bivand at nhh.no Mon Mar 9 10:45:33 2015 From: Roger.Bivand at nhh.no (Roger Bivand) Date: Mon, 9 Mar 2015 10:45:33 +0100 Subject: [Rspatial-devel] rgeos exportClasses SpatialLinesNULL In-Reply-To: <54FD4DCA.9040907@uni-muenster.de> References: <54FD4DCA.9040907@uni-muenster.de> Message-ID: On Mon, 9 Mar 2015, Edzer Pebesma wrote: > A package that imports (anything from) rgeos and declares > > MyClass1 <- setClass('MyClass1', contains = c('SpatialLines')) > MyClass2 <- setClass('MyClass2', contains = c('MyClass1')) > > keeps getting the warning: "Found the following significant warnings: > Warning: class "SpatialLinesNULL" is defined (with package slot > ?rgeos?) but no metadata object found to revise subclass > information---not exported? Making a copy in package ?minweSpatialNULL?" > > See > http://stackoverflow.com/questions/28871632/how-to-resolve-warning-messages-metadata-object-not-found-spatiallinesnull-cla > > I don't understand why this is, but so do I not understand ClassUnions. > I'm resolving this by having rgeos exportClass SpatialLinesNULL and all > the other *NULL classes. (Having it not exportClass SpatialCollections > did not resolve the problem either). > OK. I did a good deal to remove all the empty geometries in rgeos, mostly to get RNilValue back when empty instead of an empty Spatial*. There are arguments for having empty geometries too, but they create other issues, as they are valid but fail on lots of operations. Roger -- Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 91 00 e-mail: Roger.Bivand at nhh.no