如何解决如何使用R根据空间自相关规则聚合空间点?
我有以下问题:我有一个空间点数据框,其中有几个点/特征,我想根据空间自相关理论归结起来(请参阅 URL:https://rspatial.org/raster/analysis/3-spauto.html)。挑战在于以有意义的方式将属性从原始点(蓝色)减少/组合/转移到新点(红色)。
spatialpointsdataframe 的 dataframe 有几列(属性),列
spdf_buff1m <- rgeos::gBuffer(spgeom = spdf,width = 1,capStyle = 'round',byid = TRUE)
# buffer the points
spdf_buff1m_unite <- rgeos::gUnaryUnion(spgeom = spc_route_pts_spdf_buff1m)
# dissolve internal boundaries between the overlapping buffers calculated in the step before (this will result in a single feature)
spdf_buff1m_unite_dis <- raster::disaggregate(spdf_buff1m_unite)
# split the resulting single feature into multiple features again
spdf_buff1m_finalpts <- rgeos::gCentroid(spgeom = spdf_buff1m_unite_dis,byid = TRUE)
# calculate the centroids of the new points
这种方法有效,它是一种将点数归结起来的有意义的方法 - 但是,新点没有任何属性。
现在我想为新点分配有意义的属性:我想为每个新点(红色)获取落入特定缓冲区/多边形的原始点(蓝色)的最小
以下截图显示您对挑战的印象:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。