-
Notifications
You must be signed in to change notification settings - Fork 5
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
Erase overlaps keeps failing #68
Comments
Hi @Va99le, Sorry for my slow response - I'm at a conference at the moment and things have been pretty full on. Thank you very much for providing all these details! I'm assuming you're using Also, yeah, the computation for erasing overlaps definietly slows down over time for larger datadets - this is because it works by starting with nothing and then iteratively adding in protected areas, and within each iteration, it erases any parts of the new protected area that overlap with any previously added protected areas (note that PAs are added in order such that the "best" and "oldest" PAs are at the start). How does that sound? |
Hi, |
No worries! Yeah, you're exactly correct. Sorry I forgot to mention, after running the Yeah, you could definitely parallelize the process for running Also, I suppose you could extend the procedure so that it also accounts for year as well as IUCN category (i.e., Does that help? |
In case it helps, here's a quick attempt to prototype the code for parlallizing the first step of running the dissolves. Note that I haven't tested it, so it probably needs some deugging.
|
Thank you very much, I'll try it as soon as possibile. It looks like a good solution. |
Hi, |
Sorry for the slow response, I'm travelling at the moment. Yeah, that sounds like a good approach. Although most PAs many PAs would likely be restricted within the boundaries of a single country, I'm sure that there will be some exceptions (e.g., perhaps Biosphere reserves?). So while this approach might help speed things up, I think you'll probably still need to account for potetially overlapping PAs along country borders. How does that sound? |
I'm following this method right now, and it's working pretty good for the moment. It will take some time anyway. Now I'm stuck due to an error (always in wdpa_clean(), that i do not understand, should I post it here or open a new issue? The error I'm getting is: |
Sorry for my slow response - I'm travelling at the moment. Yeah, let's keep it in this issue so I can keep track of it - thanks for asking. Hmm, I haven't seen this error before sorry. I wonder if this is related to the geometry precision? What if you tried increasing it, e,g., to 1e10 or something? |
I tried increasing geometry precision even tohigher values than 1e10, up to 1e12, nothing changed. In my opinion the problem may happen before,maybe something goes wrong when fixing geometry? So that when it comes to erasing overlaps, it encounters a "null" geometry and the process stops. I also tried to uninstall the packages and to redowload them with their dependecies, including dickoa/prepr, still nothing. It's important to note that problems started to occur after a switch of R version, from 4.2.3 to 4.3. I guess there might be a problem of version with one of the required packages, more than a R version problem's, since on another device i got the same error with the precedent R version. |
Hi, Alex |
Sorry for the slow response. Hmm, it seems like |
Hi @jeffreyhanson, this is what i get: I'm processing all european countries. I get the error processing every state that has a considerable amount of protected area. The example reported in the traceback is from France, but it happens the same thing with Italy or Germany for example. |
Thanks @Va99le - that's very helpful! I'll try and take a look at this later today or tomorrow. |
I think I've got it working now, could you please try installing the
|
It worked! Thank you very much, both for your patience and for your work |
Awesome! Glad to hear it's finally working - thanks for bearing with me. This PR also contains a fix for download data from protected planet, so once other people have verified that that works too, I'll merge the PR and prepare to submit to CRAN. |
You're the man! |
Brilliant - no worries! |
Hello,
I genuinely appreciate the "wdpar" package for its usefulness and quality. Unfortunately, I continue to encounter the "topology exception, side location conflict" error while using the "erase overlaps" function. I have read from previous responses that it is necessary to increase the "geometry precision" and "snap tolerance" parameters, both of which I have tried. Even by raising the geometry precision to 10^7, I have been unable to overcome the error. However, considering the required level of precision, I cannot raise the snap tolerance beyond 25-30 meters. When attempting higher values, the computation time increases significantly, up to 50 days.
What I am trying to achieve is a file that contains all the terrestrial and partially marine protected areas of the European continent without any overlaps. Another issue I have noticed, which might be solely based on my own mistaken impression, is that the computation seems to slow down over time.
I would greatly appreciate any guidance on resolving these issues. Thank you for your work
The text was updated successfully, but these errors were encountered: