You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One MPA in Cuba is still giving an internal server error.
To recreate this error:
Run lines 1-99 in the script 'CalculatingES50.R'
Make i = 88 (instead of running through all the MPAs)
Run lines 103-105 hull = st_convex_hull(ES50_df$geom[[i]]) #find the convex hull for the polygon text = st_as_text(hull) #convert it to text SpeciesOccurence = occurrence(geometry = text) #query OBIS for species within that polygon
The text was updated successfully, but these errors were encountered:
As Abby/Pieter suggested there is a topology issue with that polygon (it's sort of NW Cuba). I tried simplifying then computing the hull. Nope. Then I trie computing the hull and then simplifying that. Nope. Then I tried simplify -> hull -> simplify. Nope. You can see in the attached that the hull is not the actual hull - close but no cigar.
So instead of investing in making this one to make it work, I just wrapped the call to robis::occurence() in a try(). Then I test what comes back. If it is an error then we force your SpeciesOccurence variable to have the NULL value. The logic of your if blocks takes care of the rest so it otherwise keeps humming.
One MPA in Cuba is still giving an internal server error.
To recreate this error:
hull = st_convex_hull(ES50_df$geom[[i]]) #find the convex hull for the polygon
text = st_as_text(hull) #convert it to text
SpeciesOccurence = occurrence(geometry = text) #query OBIS for species within that polygon
The text was updated successfully, but these errors were encountered: