[英]Polygon boundary interpolation in R
您可以使用平滑器 package來平滑 sf object。 我根據您的數據創建了一個示例,其中data
是您提供的樣本。 因為你的多邊形是不規則的形狀,所以平滑看起來也很不規則。 您可以根據需要調整平滑或更改平滑算法。 但是,樣條曲線可能適用於您的情況。
library(sf)
library(smoothr)
smooth_poly <- data %>%
st_as_sf(coords=c("x", "y")) %>%
st_union() %>%
st_convex_hull() %>%
smooth(method='spline', n=1000)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.