diff --git a/NEWS.md b/NEWS.md index b287d2e30..19f146a49 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # version 1.0-16 +* fix `st_sample()` when polygon crosses the antemeridian; #2331 + +* clean up and modernization of S3 registration of methods and tests; #2285, #2288, #2316, #2341, #2342, by @olivroy + * `[.sfc` works when setting argument `op`; #2320 * `st_sample()` for polygons is sensitive to setting `oriented = TRUE` to prevent wrongly correcting ring directions; #2308 diff --git a/tests/roundtrip.Rout.save b/tests/roundtrip.Rout.save index a54563d14..5989d1931 100644 --- a/tests/roundtrip.Rout.save +++ b/tests/roundtrip.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.1 (2023-06-16) -- "Beagle Scouts" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -83,10 +83,7 @@ attr(,"package") + + detach("package:sp") + } -Warning message: -In CPL_crs_from_input(x) : - GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order. > > proc.time() user system elapsed - 1.666 0.736 1.524 + 1.185 1.259 0.945 diff --git a/tests/sfc.Rout.save b/tests/sfc.Rout.save index c8d96d8fa..f57fbdb92 100644 --- a/tests/sfc.Rout.save +++ b/tests/sfc.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.1 (2023-06-16) -- "Beagle Scouts" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -347,7 +347,7 @@ use `st_zm(...)` to coerce to XY dimensions > > sf_extSoftVersion()[1:3] GEOS GDAL proj.4 -"3.11.1" "3.6.4" "9.1.1" +"3.12.1" "3.8.3" "9.3.1" > > # Ops.sfc: > ls = st_sfc(st_linestring(rbind(c(0,0),c(0,1)))) @@ -437,7 +437,6 @@ Classes 'sf' and 'data.frame': 100 obs. of 15 variables: - attr(*, "sf_column")= chr "geometry" - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA NA NA NA NA NA NA NA NA ... ..- attr(*, "names")= chr [1:14] "AREA" "PERIMETER" "CNTY_" "CNTY_ID" ... - - attr(*, ".sf_namespace")=function () > bb = st_as_sfc(st_bbox(nc)) > format(st_bbox(nc)) [1] "((-84.32385,33.88199),(-75.45698,36.58965))" @@ -699,7 +698,7 @@ POINT (76.1712 32.1029) > x = st_sfc(st_polygon(list(rbind(c(-180,-90),c(180,-90),c(180,90),c(-180,90),c(-180,-90)))), + crs=st_crs(4326)) > #FIXME: -> # if (sf_extSoftVersion()["proj.4"] >= "4.9.0") # lwgeom breaks on this +> # if (sf_extSoftVersion()[["proj.4"]] >= "4.9.0") # lwgeom breaks on this > # (p <- st_sample(x, 10)) > pt = st_multipoint(matrix(1:20,,2)) > st_sample(p, 3) @@ -1089,4 +1088,4 @@ CRS: NA > > proc.time() user system elapsed - 4.676 0.117 4.784 + 5.127 1.392 5.019 diff --git a/tests/spatstat.Rout.save b/tests/spatstat.Rout.save index 6a9f289a5..3df877316 100644 --- a/tests/spatstat.Rout.save +++ b/tests/spatstat.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.2 (2023-10-31) -- "Eye Holes" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -125,8 +125,8 @@ Type 'q()' to quit R. + (y = st_as_sfc(as.psp(sf))) + all.equal(st_geometry(x), y) + } -spatstat.geom 3.2-5 -spatstat.random 3.1-6 +spatstat.geom 3.2-9 +spatstat.random 3.2-3 Simple feature collection with 51 features and 1 field Geometry type: GEOMETRY Dimension: XY @@ -166,4 +166,4 @@ In st_as_sfc.owin(spatstat.geom::as.owin(x)) : > > proc.time() user system elapsed - 2.039 1.402 1.935 + 2.012 1.340 1.846 diff --git a/tests/stars.Rout.save b/tests/stars.Rout.save index 9768f4b09..f133723c2 100644 --- a/tests/stars.Rout.save +++ b/tests/stars.Rout.save @@ -1,6 +1,6 @@ -R version 4.3.1 (2023-06-16) -- "Beagle Scouts" -Copyright (C) 2023 The R Foundation for Statistical Computing +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -119,7 +119,7 @@ Geometry set for 20 features Geometry type: POINT Dimension: XY Bounding box: xmin: 1 ymin: 1 xmax: 5 ymax: 4 -Geodetic CRS: WGS 84 +Geodetic CRS: WGS 84 (CRS84) First 5 geometries: POINT (1 1) POINT (1 2) @@ -130,7 +130,7 @@ Geometry set for 20 features Geometry type: POLYGON Dimension: XY Bounding box: xmin: 0.5 ymin: 0.5 xmax: 5.5 ymax: 4.5 -Geodetic CRS: WGS 84 +Geodetic CRS: WGS 84 (CRS84) First 5 geometries: POLYGON ((0.5 0.5, 0.5 1.5, 1.5 1.5, 1.5 0.5, 0... POLYGON ((0.5 1.5, 0.5 2.5, 1.5 2.5, 1.5 1.5, 0... @@ -261,4 +261,4 @@ First 10 features: > > proc.time() user system elapsed - 1.870 0.111 1.970 + 2.705 3.789 2.027