我可以将核密度图转换为栅格,然后使用地图代数覆盖它们吗? [英] Can I convert kernel density plots to raster and then overlay them using map algebra?

查看:234
本文介绍了我可以将核密度图转换为栅格,然后使用地图代数覆盖它们吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在研究三个shapefile,每个都有点数据,并且都限制在同一窗口中.我还使用了我用来创建内核密度图的ppp格式.

I am currently exploring three shapefiles, each with point data, and all confined to the same window. I also have them in ppp format which I've used to create kernel density maps.

plot(density.ppp(smktppp, 0.5, edge=T), main="Supermarket Density")
plot(density.ppp(tptppp, 0.5, edge=T), main="Transport Density")
plot(density.ppp(farmppp, 0.5, edge=T), main="Urban Farm Density")

我想使用地图代数或模糊逻辑等方法覆盖这些图,以创建一个输出图,以显示三个组合的密度.我将如何在R中执行此操作?

I would like to overlay these plots, using map algebra, or fuzzy logic, etc, to create one output map showing the density of the three combined. How would I go about doing this in R?

推荐答案

或者,如果将三个点模式组合到单个对象中,则

Alternatively, if you combine the three point patterns into a single object

library(spatstat)
X <- superimpose(Supermarket=smktppp, Transport=tptppp, Farm=farmppp)

然后,您可以显示原始数据和强度估计值,无论是否识别出点的类型:

then you can display both the original data and the intensity estimates, with or without identifying the kind of point:

# original data:
plot(X)  # single plot with 3 different plot characters for 3 types 
plot(split(X)) # three plot panels, one for each type of point
plot(unmark(X)) # single plot without distinguishing types of points

# intensity images:
plot(density(X, 0.5)) # single plot: intensity regardless of type
plot(density(split(X), 0.5)) # three panels: intensity for each type
plot(relrisk(X), 0.5) # three panels: relative probabilities of each type

有关详细信息,请参见 spatstat书.

See the spatstat book for details.

这篇关于我可以将核密度图转换为栅格,然后使用地图代数覆盖它们吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆