简体   繁体   English

如何根据其他坐标的高程样本集估计高程

[英]How to estimate elevation based on sample set of elevations for other coordinates

Given a set of (x, y, z) points in 3D space, I want to be able to estimate the z for a new (x, y) pair.给定 3D 空间中的一组 (x, y, z) 点,我希望能够估计新的 (x, y) 对的 z。

For example: I am given a height map of a geographical feature, for example some hills in the countryside.例如:给我一张地理特征的高度图,例如农村的一些山丘。 That means that for some latitudes and longitudes, I know the elevation of the ground at that point.这意味着对于某些纬度和经度,我知道该点的地面高度。 I would like to estimate the elevation of a person standing at (latitude, longitude) that is most likely not in the sample set.我想估计一个人站在(纬度,经度)的高度,这很可能不在样本集中。

How can I do that in Java?我怎样才能在 Java 中做到这一点?

I have already researched splines but am struggling to make any progress that way, and I also just tried using graphhopper's ElevationInterpolator but it gives clearly wrong results — it doesn't seem to give accurate estimations at all, unless the provided (lat, long) are in the sample set, then it is correct, but if it's just slightly offset it gives a wildly different elevation, and it gives the same elevation for all positions that aren't in the sample set.我已经研究了样条曲线,但我正在努力以这种方式取得任何进展,而且我也只是尝试使用 graphhopper 的ElevationInterpolator,但它给出了明显错误的结果——它似乎根本没有给出准确的估计,除非提供(lat,long)在样本集中,那么它是正确的,但如果它只是稍微偏移,它会给出截然不同的高程,并且它为不在样本集中的所有位置提供相同的高程。

In case you have elevations surrounding the point in question, the best way I can see would be to find a closest enclosing triangle or a quad and interpolate linearly between those.如果您在所讨论的点周围有高程,我能看到的最好方法是找到最近的封闭三角形或四边形,并在它们之间进行线性插值。 I don't think you can get much better than that.我不认为你能得到比这更好的。

In case you only have elevations on the side of a point, all you can do is assume it is relatively flat or maybe try calculating some sort of gradient from the points you have but basically that'll only be a wild guess.如果您只有一个点的一侧有高程,您所能做的就是假设它相对平坦,或者尝试从您拥有的点计算某种梯度,但基本上这只是一个疯狂的猜测。

Depending on how big an area you're covering, there's also a geoid that you might want to take into account.根据您覆盖的区域有多大,您可能还需要考虑一个大地水准面

As for your “intuitive” formula it uses too much data around the point in question so it will definitely produce wrong results.至于您的“直观”公式,它在问题点周围使用了太多数据,因此肯定会产生错误的结果。 The fact of the matter is that the further points have nothing to do with elevation, all you need to estimate is the few closest ones and since you don't know anything about the surface anyway it doesn't really matter what the other points are.事实是,更远的点与海拔无关,您只需要估计几个最接近的点,并且由于您对表面一无所知,因此其他点并不重要. Well maybe unless you're into ML , then maybe you can get something out of them...好吧,也许除非您喜欢ML ,否则也许您可以从中得到一些东西...

I found a MicrosphereInterpolator in Apache Commons我在 Apache Commons 中找到了一个MicrosphereInterpolator

I guess this is actually a really hard problem and has no standard solution.我想这实际上是一个非常困难的问题,并且没有标准的解决方案。 This solution seems to be based on William Dudziak's 2007 MS thesis.该解决方案似乎基于 William Dudziak 的 2007 年硕士论文。

The MicrosphereInterpolator works well for me at the moment. MicrosphereInterpolator 目前对我来说效果很好。

Other solutions I have tried, for example the intuitive formula , don't give intuitive results.我尝试过的其他解决方案,例如直观的公式,不会给出直观的结果。

The only downside is that the MicrosphereInterpolator is quite slow.唯一的缺点是 MicrosphereInterpolator 很慢。

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

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