简体   繁体   English

如何在python中插入地理配准数据?

[英]How can I interpolate georeferenced data in python?

I have many lines of georeferenced hydrological data with weekly resolution: 我有许多地理参考水文数据线,每周分辨率:

Station name, Lat, Long, Week 1 average, Week 2 average ... Week 52 average

Unfortunately, I also have some data with only monthly resolution: 不幸的是,我也有一些只有月度分辨率的数据:

Station name, Lat, Long, January average, February average ... December average

Rather than "reinventing the wheel," can anyone recommend a favorite module, package, or technique that would provide a reasonable interpolation of weekly values from monthly values? 而不是“重新发明轮子”,任何人都可以推荐一个最喜欢的模块,包或技术,以提供每月价值的每周价值的合理插值? Linear would be fine, but it would be nice if we could use the coordinates to improve the interpolation based on nearby stations. 线性会很好,但如果我们可以使用坐标来改善基于附近站点的插值,那将会很好。

I've tagged this post with python because it's the language I've been using recently (although not its statistical functions). 我用python标记了这篇文章,因为它是我最近使用的语言(尽管不是它的统计函数)。 If the answer is "use a stats program like r " so be it, but I'm curious as to what's out there for python. 如果答案是“使用像r这样的统计程序”,那就这样吧,但我很好奇python的内容是什么。 Thanks! 谢谢!

I haven't had a chance to dig into it, but the hpgl (High Performance Geostatistics Library) provides a number of kriging (geospatial interpolation) methods: 我没有机会深入研究它,但是hpgl (高性能地质统计学库)提供了许多克里金(地理空间插值)方法:

Algorithms 算法

  • Simple Kriging (SK) 简单克里金(SK)
  • Ordinary Kriging (OK) 普通克里金(OK)
  • Indicator Kriging (IK) 指标克里格(IK)
  • Local Varying Mean Kriging (LVM Kriging) 局部变均值克里金法(LVM Kriging)
  • Simple CoKriging (Markov Models 1 & 2) 简单CoKriging(马尔可夫模型1和2)
  • Sequential Indicator Simulation (SIS) 顺序指示器模拟(SIS)
  • Corellogram Local Varying Mean SIS (CLVM SIS) Corellogram局部变化均值SIS(CLVM SIS)
  • Local Varying Mean SIS (LVM SIS) 局部变化均值SIS(LVM SIS)
  • Sequential Gaussian Simulation (SGS) 序贯高斯模拟(SGS)

If you are interested into expanding your experience into R, there are a number of good, well used and documented packages out there. 如果您有兴趣将您的经验扩展到R,那么有很多优秀,使用良好且记录在案的软件包。 I would start by looking at the Spatial Taskview, which lists what packages can be used for spatial data. 我将首先查看Spatial Taskview,其中列出了可用于空间数据的包。 One of the paragraphs deals with interpolation. 其中一段涉及插值。 I am most familiar with automap/gstat (I wrote automap), where especially gstat is a powerfull geostatistics package which supports a wide range of methods. 我最熟悉的是automap / gstat(我写过自动化),其中特别是gstat是一个强大的地理统计软件包,它支持各种方法。

http://cran.r-project.org/web/views/Spatial.html http://cran.r-project.org/web/views/Spatial.html

Integrating Python and R can be done in multiple ways, eg Using system calls or an in memory link using Rpy. 集成Python和R可以通过多种方式完成,例如使用系统调用或使用Rpy的内存链接。 See also: 也可以看看:

Python interface for R Programming Language R编程语言的Python接口

I am looking into doing the same thing, and I found this kriging module written by Sat Kumar Tomer at AMBHAS . 我正在考虑做同样的事情,我发现这个克里金模块由Sat Kumar Tomer在AMBHAS编写

There appears to be methods for producing variograms and performing ordinary kriging. 似乎存在用于产生变差函数和执行普通克里金法的方法。

I'll update this answer if I use this and make further discoveries. 如果我使用它并进一步发现,我会更新这个答案。

Since I originally posted this question (in 2012!) an actively-developed Python Kriging module has been released https://github.com/bsmurphy/PyKrige 自从我最初发布这个问题(2012年!)以来,已经发布了一个积极开发的Python Kriging模块https://github.com/bsmurphy/PyKrige

There's also this older option: https://github.com/capaulson/pyKriging 还有这个较旧的选项: https//github.com/capaulson/pyKriging

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM