当我尝试绘制使用开放街道地图查询的日内瓦湖时,出现以下错误:
Error in do.call(rbind, x) : variable names are limited to 10000 bytes
代码是这样的:
library(osmdata)
library(tidyverse)
library(sf)
library(purrr)
lakes <- getbb("geneva") %>%
opq() %>%
add_osm_feature(key = "natural", value = "water") %>%
osmdata_sf() %>%
purrr::pluck("osm_multipolygons") %>%
filter(water == "lake")
ggplot() +
geom_sf(data = lakes)