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

upcoming sp -test problem #387

Closed
mdsumner opened this issue May 19, 2020 · 2 comments
Closed

upcoming sp -test problem #387

mdsumner opened this issue May 19, 2020 · 2 comments

Comments

@mdsumner
Copy link

Found this doing revdep checks for upcoming sp, not PR-ing as I'm not sure if the test or package should change. Best

library(sp)
Sr1 <- Polygon(cbind(c(-89.0001,-89,-88.9999,-89,-89.0001),c(46,46.0001,46,45.9999,46)))
Sr2 <- Polygon(cbind(c(-88.6,-88.5999,-88.5999,-88.6,-88.6),c(45.2,45.2,45.1999,45.1999,45.2)))
Srs1 <- Polygons(list(Sr1), "s1")
Srs2 <- Polygons(list(Sr2), "s2")
 SP <- SpatialPolygons(list(Srs1,Srs2), proj4string = CRS("+proj=longlat +datum=WGS84"))
simplegeom(SP)

Error in asMethod(object) : 
  "+proj=longlat +datum=WGS84 +no_defs" not supported for "simplegeom", use "+proj=longlat +datum=WGS84"
In addition: Warning messages:
1: In proj4string(from) : CRS object has comment, which is lost in output
2: In proj4string(from) :
 Error in asMethod(object) : 
  "+proj=longlat +datum=WGS84 +no_defs" not supported for "simplegeom", use "+proj=longlat +datum=WGS84" 

so I think it's a matter of dropping "+no_defs" from the test, or fixing the comparison.

test-geoknife_setters.R:45: warning: geoknife converts SpatialPolygons to simplegeoms correctly
CRS object has comment, which is lost in output

test-geoknife_setters.R:45: warning: geoknife converts SpatialPolygons to simplegeoms correctly
CRS object has comment, which is lost in output

test-geoknife_setters.R:45: error: geoknife converts SpatialPolygons to simplegeoms correctly
"+proj=longlat +datum=WGS84 +no_defs" not supported for "simplegeom", use "+proj=longlat +datum=WGS84"
Backtrace:
 1. testthat::expect_is(simplegeom(SP), "simplegeom") C:\Users\michae_sum\Documents\Git\geoknife/tests/testthat/test-geoknife_setters.R:45:2
 5. geoknife::simplegeom(SP) R/06-simplegeom-obj.R:61:2
 6. methods::as(.Object, "simplegeom") R/06-simplegeom-obj.R:79:2
 7. geoknife:::asMethod(object)
------------------------------------------------------------------------------------------------

there are other test errors that look unrelated to sp

@jordansread
Copy link
Contributor

@dblodgett-usgs I am swamped for the next two weeks, do you have an opening to take a look at these test issues? Otherwise, I can assign myself the issue for later.

Thanks @mdsumner

@dblodgett-usgs
Copy link
Collaborator

Yeah, I'll get it.

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

3 participants