Question

I recently came accross a site http://www.daftlogic.com/sandbox-google-maps-find-altitude.htm

which gives me the elevation data of each point of any earth's location. Now I want to build a desktop application in C# , using google maps api or otherwise , in which the user will search for the location and the image will be displayed of that location , where user can zoom in or out and select the required area. After selection , the tool will get elevation data of every point in the selected area , and it will create respective color in that point , so the highest point will have white and lowest point will have black , then it will convert the data into an image format. So if I can do this , I can basically create heightmap in seconds.

Can anyone tell me how to achieve this ? I don't have any idea regarding how to get the elevation data of every point in selected region , and how to calculate and create color image from that data.

Thanks.

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top