IDW

作者: 寻松点点 | 来源:发表于2020-08-11 22:38 被阅读0次

Python三维图

image.png
#encoding=utf-8
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# 3D coordination
fig = plt.figure()
ax = fig.gca(projection='3d')

#set axis length 
ax.set_xlim(70, 200)
ax.set_ylim(-90, 180)
ax.set_zlim(0, 10)
# set axis label
ax.set_zlabel('Z', fontdict={'size': 15, 'color': 'red'})
ax.set_ylabel('Y', fontdict={'size': 15, 'color': 'blue'})
ax.set_xlabel('X', fontdict={'size': 15, 'color': 'yellow'})
plt.show()

空间数据散点图

image.png

因为坐标轴没用从零点开始,所以绘制蓝色的点表示(0,0,0)坐标原点

#encoding=utf-8
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = fig.gca(projection='3d')

# np.array( ) 切片 input data
data=np.array([
[129.0,    7.5,  4],
[140.0,  141.5,  8],
[108.5,   28.0,  6],
[ 88.0,  147.0,  8],
[185.5,   22.5,  6],
[195.0,  137.5,  8],
[105.5,   85.5,  8],
[157.5,   -6.5,  9],
[107.5,  -81.0,  9],
[ 77.0,    3.0,  8],
[81.0,   56.5,  8],
[162.0,   84.0,  4],
[117.5,  -38.5,  9],
[162.0,  -66.5,  9]     ])


x = data[:,0]
y = data[:,1]
z = data[:,2]

ax.scatter(x, y, z, c='r')
ax.scatter(0, 0, 0, c='b')

ax.set_xlim(70, 200)
ax.set_ylim(-90, 180)
ax.set_zlim(0, 10)
ax.set_zlabel('Z', fontdict={'size': 15, 'color': 'red'})
ax.set_ylabel('Y', fontdict={'size': 15, 'color': 'red'})
ax.set_xlabel('X', fontdict={'size': 15, 'color': 'red'})
plt.show()

1.https://giscourses.cfans.umn.edu/sites/giscourses.cfans.umn.edu/files/interpolation.pdf

  1. https://system.umn.edu/
    一个简答的IDW插值Demo
image.png

通过三个已知点对中间点的数值进行插值估算。


image.png
#encoding=utf-8
import numpy as np
import matplotlib.pyplot as plt


z =np.array([50,30,52])
d=np.array([4,2,6])
p=1
A=sum(z*1/(d**p))
B=sum(1/(d**p))
z0=A/B
print(z0)

相关文章

  • IDW

    Python三维图 空间数据散点图 因为坐标轴没用从零点开始,所以绘制蓝色的点表示(0,0,0)坐标原点 1.ht...

  • The math behind Inverse Distance

    There’s nothing to be afraid of with IDW math. Remember t...

  • 散文《一只小黄鼠》

    https://mp.weixin.qq.com/s/Tky1GAXp6-mBEcZbh-0IDw

  • geotools中等值面的生成与OL3中的展示

    概述: 本文讲述如何在geotools中IDW插值生成等值面,并根据给定shp进行裁剪,并生成geojson数据,...

  • Python中ArcPy读取Excel表格长时间序列数据、批量反

      本文介绍基于Python中ArcPy模块,实现Excel数据读取并导入图层,同时进行IDW插值与批量掩膜的方法...

  • 革命

    (此短篇联系到IDW《威震天本纪》,部分内容摘自此漫画) 文/Evantso “你们知道C-12那边出状况了吗?”...

  • Geotools中实现NC转等值面

    概述: 前面的文章有实现IDW插值并生成等值面的,本文在前文基础上实现气象NC数据生成等值面。 效果: Arcgi...

  • 填色图MI尝试

    站点数据绘制等值线:(1)将站点数据插值为格点数据。在MeteoInfo中,有反距离权法(IDW)和cressma...

  • 《往事不堪回首》警爵/IDW(欢脱向)

    CP:警车X爵士背景:IDW战前注意:有私设,内含滑板车 想知道为什么警车能把爵士压在下面吗?︿( ̄︶ ̄)︿(别信...

  • 0-Day Week of 2017.03.01

    囊括漫图、IDW、黑马、BOOM及各小众漫画的资源!这是3.1~3.8各扫图组发布的美漫图源合集,总共5.91 G...

网友评论

      本文标题:IDW

      本文链接:https://www.haomeiwen.com/subject/ctsudktx.html