-
Notifications
You must be signed in to change notification settings - Fork 294
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
Memory issue using st_intersection #394
Comments
I'd be happy to try on my machine if you make the data available, but it would also help if you gave your |
Rdata file: Session info: R version 3.4.0 (2017-04-21) Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
I succeeded on my 16 Gb laptop, but the R process in the end needed 11 Gb memory. If you have that much, do install the 64 bits version of R first. |
I had a similar problem that I solved using Note that Is there any reason why |
I wish it were easy! I am not a C++ programmer, so I don't exactly know what to look for, but when I saw that |
I actually had encountered these issues numerous times but due to time pressure at work and corporate data didn't get around to post issues. Though be sure that performance improvements are highly appreciated. And I hope to find more time and data to report issues that arise during our standard workflow. In any case, sf has made our lives so much easier! |
I still need to get the areas of the new polygons from the intersection. My solution was to use aggregate.sf to create multipolygon features for 28 categories in the larger object, then run st_intersection. |
Also, a factor 20 speedup (in this case) when using a spatial index, see here. |
Cool - can't wait for it to be available on CRAN! For some reason the current
|
Was that on the example above,
? And by |
yeah - that is what I meant. I ended up solving the problem by getting rid of duplicate geometry libraries from an old QGIS install. Now I think I am working with a pure homebrew setup and devtools worked. By the way, spatial indices are awesome! Thank you for implementing them. |
Oddly, had this pop up today as well with st_union while running on a cluster with 32GB memory allocated Error in CPL_geos_union(st_geometry(x), by_feature) : But, it's a sporadic error - I reran the same line of code on the object, and it was fine. Any thoughts to what one might do to have your system poised to deal with this? |
I am running into memory issues using st_intersection on two sf objects. The first one is 19.4 MB (16398 obs. of 4 variables) and the second is 17.1 MB (6869 obs. of 2 variables).
int = st_intersection(test,hsg2)
Error in CPL_geos_op2(op, st_geometry(x), st_geometry(y)) :
Evaluation error: std::bad_alloc.
I hope this is enough information to decide whether this a bug worth investigating or whether it's just a problem on my end. I can provide any info or files needed.
The text was updated successfully, but these errors were encountered: