Open jmhallas opened 3 years ago
I'm pretty sure it's an issue with how dense the outer
points are.
I pruned them by rounding and then dropping duplicates (from ~1500 pts to ~150 pts). The coarse habitat is then a valid ring. outer-coarse.txt
Here are the three lines of code to check whether a geometry is a valid ring or not.
x <- outer[, 1]
y <- outer[, 2]
l <- readWKT(paste("LINESTRING(", paste(paste(x, y), collapse = ", "), ")"))
rgeos::gIsRing(l, byid = FALSE)
Hello,
I am receiving the following error:
"The habitat geometry is not a valid ring (a ring is both simple and closed) Let the habitat be the rectangle defined by (xmin, ymin) and (xmax, yxmax) where xmin, xmax = range(longitude) and ymin, ymax = range(latitude). Plotting posterior probability trace"
I have checked my outer.txt and the first and last lat long are the same. (attached) outer.txt
Here is my script:
I have rerun older analyses and I received no error. I have also been able to run the current data using the function make_eems_plots from reemsplots2 and received no error. I am unable to figure out the issue. Any suggestions? Thank you for your time.