Use SRTM data to display contour lines on Google Earth (requires a lot of work)

Source: Internet
Author: User
Tags mdb database
Use SRTM data to display contour lines on Google Earth (requires a lot of work)

Use SRTM data to display contour lines on Google Earth

Keyword: SRTM goolge Earth kml contour line globalmapper script

0. File description

Kml2contourmdb.exe, generate a global er script, and convert kml into an mdb database
DB/, folder, store database templates and ASP files
Contour. mdb, database file
Contour. asp, ASP file
Inc_color.asp, contour color configuration. (-50 meters-8500 meters)

1. Raw Materials
Download the srtmdata from http://srtm.csi.cgiar.org/selection/inputcoord.asp. On the world map, select the region you want to download, and then download the geotif data. The downloaded file is a zip compressed file. decompress the file, for example, z_58_8.tif, do not modify the file name.

2. Tools
1. if global mapper V9 has not been installed on your computer, install it first. You can download it at the following URL:
Http://down1.3ddown.com/5z1gKhPK/Down/2007/09B/Global.Mapper.v9.00.zip
Http://down1.3ddown.com/5z1gKhPK/Crack/2007/09B/Global.Mapper.v9.00-Crack.zip
(After the first file is installed, copy global_mapper9.exe In the compressed file to the installation folder)
2. Download the tool I created.
3. Install iis5/6.

3. Start Conversion
1. Convert TIF to kml.
Run kml2contourmdb.exe and click [geotiff to kml]. Then, in the new window that appears, perform the following operations: [Add file]-> select the extracted tif file-> [conversion]-> Generate a global mapper script in the text box below-> [run]
After you click "run", the CPU starts to 100%. After a while, the memory also starts to rise. It is best to set the virtual memory to more than MB.
The generated global mapper script is used to generate a contour line with a precision of 50 meters and then save it as a kml file. If the entire block conversion takes too long (how long? P41.8a over 2.83, memory 512 M, Virtual Memory 1g, Hard Drive lights red for more than two hours, prompt conversion failure, crazy), So divide each block into five small pieces for conversion, the original one has 5x5 degrees, and now it has become 5x5 (1 degree x 5 ). Although this process is done, it may take about 30 minutes to process each piece of data (Be patient or wait for the computer to process the data normally ). After conversion, the kml transferred from each TIF is about m-300m. Therefore, if there are many files to be processed, pay attention to the remaining space on the hard disk.
After a long wait, the CPU is reduced to 2-3 bytes, And the global_mapper9.exe process in the Process Manager disappears. This means that the conversion has been completed. In the folder where the TIF is stored, multiple kml files (5 kml for each TIF) have been generated ).

2. Convert kml to MDB to facilitate our search.
Run kml2mongomdb.exe and perform the following operations:
[Add file]-> select kml file-> [start import]-> wait for completion... 3
Figure 3 Status: (4) processed files, (5) progress bar, current file progress, title bar number, current number of lines/number of bus lines.
It also takes more than 10 minutes to import data (each TIF). After importing data to the database, each kml is imported to a table, and each TIF generates an MDB file. The file splitting is for ease of management. After a TIF is imported, the generated MDB file is about-MB. Importing 10 MDB files takes several GB. The file is too large to manage. To optimize table sharding, the MDB File Name and table name are automatically calculated based on the request's longitude and latitude.

4. Release
1. Copy all the files in the DB folder to your website folder or IIS virtual folder.
2. Add a Netlink in GE to point to your newly published website, such as http: // localhost/contour. asp.

5. Complete

6. Problems
1. contour line color, gradient from-50-8500 meters, blue to red, does not look obvious in the local area, so it is best to obtain the highest contour line and the lowest contour line, and then re-calculate the color of the contour line. If you have other friends who have completed this function, please send me an email.
2. When importing kml, it occupies a large amount of resources. Because MSXML control is used, and kml has too many nodes, It is very slow and occupies a large amount of memory. Consider using sax.
3. Once again, please be patient when handling this. I have no choice but to store so much data.

7. Copyright
Free to use, free to spread, and free to modify code (remember to keep the original author, ).

A fishbone
Http://515800.cn
Yztink@163.com
QQ: Friends are full

07.11.22

Conversion Tool 004343.rar

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.