【发布时间】:2021-02-07 00:14:56
【问题描述】:
我想创建从北到南的等距多段线,每条线之间的间距为 50 英里,长 10 英里。不确定这是否可以使用 sf 包。在下面的示例中,我想让线条填充华盛顿州的县。
library(tigris)
library(leaflet)
states <- states(cb = TRUE)
counties<-counties(cb=TRUE)
counties<- counties%>%filter(STATEFP==53)
states<- states%>%filter(NAME=="Washington")
leaflet(states) %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(fillColor = "white",
color = "black",
weight = 0.5) %>%
addPolygons(data=counties,color='red',fillColor = 'white')%>%
setView(-120.5, 47.3, zoom=8)
【问题讨论】:
-
你只想要一条从西到东穿过华盛顿中部的垂直线吗?
-
你能分享一张你想要输出的图像吗?
-
我在上面的问题中添加了我想做的事情的图像。谢谢!
标签: r geospatial sf rgeo-shapefile