Skip to content

Commit

Permalink
clean up tests; news
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Mar 17, 2024
1 parent 5a8f9e5 commit 6ece180
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 3 additions & 6 deletions tests/roundtrip.Rout.save
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
11 changes: 5 additions & 6 deletions tests/sfc.Rout.save
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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))))
Expand Down Expand Up @@ -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))"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -1089,4 +1088,4 @@ CRS: NA
>
> proc.time()
user system elapsed
4.676 0.117 4.784
5.127 1.392 5.019
10 changes: 5 additions & 5 deletions tests/spatstat.Rout.save
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
10 changes: 5 additions & 5 deletions tests/stars.Rout.save
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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...
Expand Down Expand Up @@ -261,4 +261,4 @@ First 10 features:
>
> proc.time()
user system elapsed
1.870 0.111 1.970
2.705 3.789 2.027

0 comments on commit 6ece180

Please sign in to comment.