年际变化分析的好帮手-标准差椭圆

时间:2022-07-25
本文章向大家介绍年际变化分析的好帮手-标准差椭圆,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

第一眼看到椭圆,你会想到什么?

(侵删)

其实我啥也想不到,直到。。。

我才意识到,椭圆其实很有趣,它的长短半轴可以表示异质性的方向,中心点又可以表示空间的平均中心。多个图层的叠加就能解决好多年趋势的图示。这个方法的实现其实很简单,在ArcGIS中的方向分布(标准差椭圆)即可实现。需要注意的是,在ArcGIS中需要按照矢量方式实现。如果你的数据是栅格,可以先转为矢量在ArcGIS中实现,也可以使用Python直接使用栅格实现,具体可以搜索(Skewed gaussian distribution within an ellipse with python)

好了,讲讲ArcGIS的方向分布的功能吧:官方中文的解释,标准差椭圆是概括地理要素的空间特征:中心趋势、离散和方向趋势。

(插图也是良心啊~)

至于实现的途径,1可以直接用ArcGIS实现,2可以用IDLE(python2)实现,其中python的官方示例.

import arcpy
arcpy.env.workspace = r"C:data"
arcpy.DirectionalDistribution_stats("AutoTheft.shp", "auto_theft_SE.shp", "1_STANDARD_DEVIATION", "#", "#")
# Measure the geographic distribution of auto thefts
 
# Import system modules
import arcpy
 
# Local variables...
workspace = "C:/data"
locations = "AutoTheft.shp"
links = "AutoTheft_links.shp"
standardDistance = "auto_theft_SD.shp"
stardardEllipse = "auto_theft_SE.shp"
linearDirectMean = "auto_theft_LDM.shp"
 
try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    arcpy.env.workspace = workspace
 
    # Process: Standard Distance of auto theft locations...
    arcpy.StandardDistance_stats(locations, standardDistance, "1_STANDARD_DEVIATION", "#", "#")
 
    # Process: Directional Distribution (Standard Deviational Ellipse) of auto theft locations...
    arcpy.DirectionalDistribution_stats(locations, standardEllipse, "1_STANDARD_DEVIATION", "#", "#")
 
    # Process: Linear Directional Mean of auto thefts...
    arcpy.DirectionalMean_stats(links, linearDirectMean, "DIRECTION", "#")
 
except:
    # If an error occurred while running a tool, print the messages 
    print arcpy.GetMessages()

结果有1个关键的参数,旋转,表示数据的方向角度,其实就是与数据分布相关。

感兴趣的等我的实战示例吧(大概率没有)

微信号:一个有趣的灵魂W

关注我们,了解更多