[geos-devel] Testing OverlayNG robustness in R-sf
Roger Bivand
Roger.Bivand at nhh.no
Fri Oct 16 11:59:32 PDT 2020
On Thu, 15 Oct 2020, Martin Davis wrote:
> On Thu, Oct 15, 2020 at 9:00 AM Roger Bivand <Roger.Bivand at nhh.no> wrote:
>
>>
>> Anyway, the failure count is very low, a half-dozen from hundreds is fine
>> (and if they didn't write tests, that isn't our problem...).
>>
>
> What would be especially interesting is to see whether OverlayNG resolves
> the various overlay robustness issues reported in R-sf issues.
>
> E.g.
> https://github.com/r-spatial/sf/issues/794
(I had a local copy of the all.rds file)
> all %>% st_intersection -> o
Error in CPL_nary_intersection(x) :
Evaluation error: TopologyException: found non-noded intersection
between LINESTRING (28.2168 45.4666, 28.2153 45.4669) and LINESTRING
(28.2153 45.4669, 28.2168 45.4666) at 28.215309983502991
45.466850983501708.
> all %>% st_set_precision(1e8) %>% st_intersection -> o
Error in CPL_nary_intersection(x) :
Evaluation error: TopologyException: found non-noded intersection
between LINESTRING (40.1413 4.01209, 40.1296 4.00625) and LINESTRING
(40.1413 4.01209, 40.1296 4.00625) at 40.141307598308956
4.0120866067334404.
> https://github.com/r-spatial/sf/issues/603
> library(sf)
Linking to GEOS 3.9.0dev, GDAL 3.2.0dev-b51dc28ab7, PROJ 7.2.0
> p1 <- readRDS("p1.rds")
> p2 <- readRDS("p2.rds")
> p3 <- sf::st_difference(p1, p2)
so now runs with Overlay-NG and sf's default 0 precision, but sf has also
changed since late 2017.
> https://github.com/r-spatial/sf/issues/936
>
Error in CPL_nary_intersection(x) :
Evaluation error: TopologyException: Input geom 0 is invalid:
Self-intersection at 314406.13208707399 -5762352.8343122564.
> o <- st_make_valid(test_set)
> overlap <- st_intersection(o)
Error in CPL_nary_intersection(x) :
Evaluation error: TopologyException: found non-noded intersection
between LINESTRING (316483 -5.76278e+06, 316483 -5.76278e+06) and
LINESTRING (316483 -5.76278e+06, 316411 -5.76283e+06) at
316482.77665721485 -5762778.376178137.
Cases 794 and 936 are all-by-all intersections, and as noted in the latter
issue, the problems occurring differ by input order.
Please ask off-list if someone needs all.rds from 794.
Roger
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
More information about the geos-devel
mailing list