-
Notifications
You must be signed in to change notification settings - Fork 23
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
stencil from SpatialPolygons or SpatialPolygonsDataFrame #291
Comments
@ghost sorry, just saw this. The method to coerce sp into a simplegeom is a bit of a mess - this is something that can be done with the existing package, but it isn't exposed because I don't yet have a good way to make sure the projections of the sp objects that exist can be handled by the processing. I would like to take care of this, just hadn't run into a user yet that needed it. what is the CRS you are using? |
@jread-usgs +1 on this! And I think I understand the projection issue you mentioned. Could you just require a specific projection and let the user deal with the transformation or am I missing something (likely)? |
Yep, you got it Jeff, or I could support a few common ones with a look up and fail with a descriptive error when it isn't supported. That way people could easily PR a new proj |
Here is where the WGS84 is hardcoded in for I think we can work on the setMethod("simplegeom", signature("Spatial"), function(.Object, ...) {
}) method so that using SPdfs and the like is intuitive @jhollist and @ghost |
BTW, when this is implemented initially, it will only support |
This is implemented and on the current CRAN version. Feedback welcome. |
Getting the following errors when passing a class SpatialPolygons or SpatialPolygonsDataFrame to simplegeom:
stencil <- simplegeom(a)
Error in as(.Object, "simplegeom") :
no method or default for coercing “SpatialPolygons” to “simplegeom”
stencil <- simplegeom(MSA)
Error in as(.Object, "simplegeom") :
no method or default for coercing “SpatialPolygonsDataFrame” to “simplegeom”
class(a)
[1] "SpatialPolygons"
attr(,"package")
class(MSA)
[1] "SpatialPolygonsDataFrame"
attr(,"package")
[1] "sp"
The text was updated successfully, but these errors were encountered: