0

我最近访问了一个网站 http://www.daftlogic.com/sandbox-google-maps-find-altitude.htm

这给了我任何地球位置的每个点的高程数据。现在我想用 C# 构建一个桌面应用程序,使用 google maps api 或其他方式,用户将在其中搜索位置并显示该位置的图像,用户可以在其中放大或缩小并选择所需区域。选择后,该工具将获取所选区域内每个点的高程数据,并在该点创建相应的颜色,使最高点为白色,最低点为黑色,然后将数据转换为图像。格式。所以如果我能做到这一点,我基本上可以在几秒钟内创建高度图。

谁能告诉我如何实现这一目标?我不知道如何获取选定区域中每个点的高程数据,以及如何从该数据计算和创建彩色图像。

谢谢。

4

1 回答 1

0

I've had a look at the Google address you've pasted. My answer here is not exactly about that but it might halp you understand how elevation works. Google, as many other websites, uses a DEM map (Digital Elevation Maps: http://en.wikipedia.org/wiki/Digital_elevation_model) which is a rasterized image of a certain area, in which every pixel represent a real sample from the Satellite/Shuttle (or the interpolation between two sampled points). These maps are quite huge, depending on the sampling frequence. For some area of the Globe the sampling area is very dense, while for other areas is more sparse. The USA have the best detail. If you want to download the free DEMs this is a good starting point: http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp

You could download a sample of every part of the area you want to include in your application, convert the data into a database (latitude, longitude, altitude) and have your application query the DB and return a set of pixels that you can paint in different colors, accordingly with your altitude ranges.

Hope this helped

于 2014-04-09T03:40:23.683 回答