rnaturalearth
rnaturalearth copied to clipboard
ne_countries() with returnclass = "sf" crashes in CentOS 7 Linux
ne_countries() function in rnaturalearth version 0.2.0 under R version 4.0.1 on a Linux server:
Operating System: CentOS Linux 7 (Core) Architecture: x86-64
crashes:
> world <- rnaturalearth::ne_countries(scale = "medium", returnclass = "sf")
*** caught segfault ***
address (nil), cause 'unknown'
Traceback:
1: CPL_crs_from_input(x)
2: make_crs(x)
3: st_crs.character(x@projargs)
4: st_crs(x@projargs)
5: st_crs.CRS(x@proj4string)
6: st_crs(x@proj4string)
7: append(lst, list(crs = st_crs(x@proj4string), precision = precision))
8: do.call(st_sfc, append(lst, list(crs = st_crs(x@proj4string), precision = precision)))
9: structure(sfc, bbox = bb)
10: handle_bbox(do.call(st_sfc, append(lst, list(crs = st_crs(x@proj4string), precision = precision))), x)
11: st_as_sfc.SpatialPolygons(sp::geometry(x), ...)
12: st_as_sfc(sp::geometry(x), ...)
13: st_as_sf.Spatial(x)
14: st_as_sf(x)
15: ne_as_sf(spdf[filter, ], returnclass)
16: rnaturalearth::ne_countries(scale = "medium", returnclass = "sf")
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Using returnclass = "sp" works but is not what is needed.
Downloading directly from this repo (using the remotes package) did not help.