-
Notifications
You must be signed in to change notification settings - Fork 8
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
aw_interpolate() fails when attempting to cast to MULTIPOLYGON #6
Comments
aw_interpolate()
fails when attempting to cast geometry
to MULTIPOLYGON
MULTIPOLYGON
MULTIPOLYGON
Also, just wanted to give an early thanks for this package! I've done some areal interpolation in R before, but it makes a lot of sense to turn it into a package. |
Thanks @mfherman! This might be a bit of an edge case - the only reference I can find to the error from Your intersection is creating geometry collections, which our test data has not done. Reading between the lines of the I'm going to leave this open until we merge the PR - we've got a backlog since the package is under CRAN review. What we'll do is wait until we hear back from the initial review. If we have to resubmit, will merge the Otherwise, will merge into |
Thanks, @chris-prener! |
Glad to hear it @mfherman! |
@chris-prener -- I think the fix to this issue might be causing some performance issues when it isn't really needed. A little back of the envelope profiling of my Warning message:
In st_collection_extract.sf(intersection) : x is already of type POLYGON. Reproduce with: big_test.rda.zip load("big_test.rda")
int <- areal::aw_intersect(target_polygons, data_source_cells, "area") I'm not really sure what the consequences of not calling that are or what the best check would be to see if you don't need it... will do some research and get back to you. |
Describe the bug
aw_interpolate()
fails when when attempting to castgeometry
toMULTIPOLYGON
. Possibly due to source and targetsf
objects beingMULTIPOLYGON
and notPOLYGON
?To Reproduce
I'm not sure if this is the most minimal example as it involves grabbing data and geometry using
tidycensus
, but I believe it reproduced the error I was having working with the other shapefiles I was working with. I first tryaw_interpolate()
and then break down that function to pinpoint where it seems like the error is occurring for me.Created on 2018-12-20 by the reprex package (v0.2.1)
Desktop (please complete the following information):
Additional context
I'm able to successful run the examples in the vignettes on this machine.
The text was updated successfully, but these errors were encountered: