首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >年际变化分析的好帮手-标准差椭圆

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

作者头像
一个有趣的灵魂W
发布2020-09-15 15:28:21
1.4K0
发布2020-09-15 15:28:21
举报

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

(侵删)

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

我才意识到,椭圆其实很有趣,它的长短半轴可以表示异质性的方向,中心点又可以表示空间的平均中心。多个图层的叠加就能解决好多年趋势的图示。这个方法的实现其实很简单,在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

关注我们,了解更多

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2020-05-07,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 一个有趣的灵魂W 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档