Closed JonasGeschke closed 4 years ago
same in the "GRC" (Greece) subset:
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at 2004406 4598038.
(just putting it down here to have a collection where errors pop up. the more often they appear, the more general the problem probably is ...)
same in the "BGR" (Bulgaria) subset:
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at 2624909 4999187.7525391364.
same but different in the "AUT" (Austria) subset:
Error in CPL_geos_op2(op, st_geometry(x), st_geometry(y)) : Evaluation error: TopologyException: no outgoing dirEdge found at 1243901 5365689.0999999996.
just see similar errors are dealt with in #13. are the code fixes already on CRAN?
error in "BEL" Belgium subset:
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at 427241 5675070.
error in "BRA" Brazil subset:
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at -4449272 -152694.
Thanks for reporting this - I'll take a look and see what I can do. In the meantime, if you're planning on dissolving all the polygons together or rasterizing the polygons then you can skip this "erasing overlaps" step erase_overlaps = TRUE
.
Thanks for checking it. Probably the errors are done with the fix in #13, I didnt check this.
another error in "ITA" (Italy):
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at 1025649 5066855.
another error in "ESP" (Spain):
Error in CPL_geos_union(st_geometry(x), by_feature) : Evaluation error: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -517842 4727376.2839926593 at -517842 4727376.2839926593.
another error in "GBR" (United Kingdom):
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at -307405 6250924.
I now re-run cleaning with the development version of wdpar
. I mark all errors that are resolved with a thumb-up ...
Thanks for reporting this - I'll take a look and see what I can do. In the meantime, if you're planning on dissolving all the polygons together or rasterizing the polygons then you can skip this "erasing overlaps" step
erase_overlaps = TRUE
.
As a simple feedback question to this point: Sounds like you wouldn't use wdpa_clean
for dissolving the WDPA. How would you do it?
For now, with use of the development version of wdpar
, only GRC keeps to result in the error:
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at 2624909 4999187.7525391364.
// Germany and US subset still to be done ...
error in "DEU" (Germany):
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at 1273919.4773302849 5975333.6278681727.
also in "USA":
Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern, : Evaluation error: TopologyException: side location conflict at -11068713 4016836.
Hmm, you might need to increase the precision of the geometry calculations for these datasets. Try increasing the geometry_precision
argument to 1e+6
or 1e+8
in wdpa_clean
. This makes the geoprocesssing more robust/correct, but increases run time, so finding the right balance can be tricky.
I've just pushed a patch which should make the overlap erasing procedure in wdpa_clean
more robust, so hopefully this fixes the issues you're experiencing. Could you please try with the latest version?
Great, thanks, I will let you know how it works out.
Working with the development version of wdpar
, there are currently no typology evaluation errors anymore (even without changing the precision).
in addition to #19, I came across the following error in the "DNK" (Denmark) subset: