Using TerraGear: Difference between revisions

Jump to navigation Jump to search
m
→‎Elevation data: : protect Bash against spaces in files and directories names
mNo edit summary
m (→‎Elevation data: : protect Bash against spaces in files and directories names)
Line 52: Line 52:
The best worldwide elevation data currently available is from the Shuttle Radar Topography Mission (SRTM). There are two types of SRTM data:  
The best worldwide elevation data currently available is from the Shuttle Radar Topography Mission (SRTM). There are two types of SRTM data:  
* Highly accurate 1-arcsecond resolution data, known as SRTM-1, for the USA  
* Highly accurate 1-arcsecond resolution data, known as SRTM-1, for the USA  
* Less accurate 3-arcsecond data, known as SRTM-3, for the rest of the world.  
* Less accurate 3-arcsecond resolution data, known as SRTM-3, for the rest of the world.  
From now on, we'll assume you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical.
From now on, we'll assume you are using SRTM-3 data. Unless otherwise noted, the process for SRTM-1 is identical.


You can download the appropriate data from http://dds.cr.usgs.gov/srtm/version2_1/. You want all .hgt.zip files covering your region of interest. Depending on the size of your scenery, there may be quite a few. Download them to <code>data/SRTM-1/</code>(or SRTM-3/SRTM-30 depending on the type you downloaded) in your base directory. (Genapts looks for a few known, hardcoded elevation data directories in its working directory. SRTM-30 is one of them and this is the least confusing in that list. Note: W.E.F. 31st July 2010, the genapts tool now also looks for SRTM-1/SRTM-3 directories. If you are using an older version, please supply the directories using --dem-path).
You can download the appropriate data from http://dds.cr.usgs.gov/srtm/version2_1/. You want all .hgt.zip files covering your region of interest. Depending on the size of your scenery, there may be quite a few. Download them to <code>data/SRTM-1/</code> (or SRTM-3/SRTM-30 depending on the type you downloaded) in your base directory. (Genapts looks for a few known, hardcoded elevation data directories in its working directory. SRTM-30 is one of them and this is the least confusing in that list. Note: W.E.F. 31st July 2010, the genapts tool now also looks for SRTM-1/SRTM-3 directories. If you are using an older version, please supply the directories using --dem-path).


Now we've got the data, we need to convert it into something of use to TerraGear. First, you need to unzip each of the .hgt files. After that, open the commandline (Windows: Start > Run > <code>cmd.exe</code>) and change into the base directory (<code>cd .../.../TerraGear</code>).
Now we've got the data, we need to convert it into something of use to TerraGear. First, you need to unzip each of the .hgt files. After that, open the commandline (Windows: Start > Run > <code>cmd.exe</code>) and change into the base directory (<code>cd .../.../TerraGear</code>).
Line 69: Line 69:


For Linux:
For Linux:
  for i in $PWD/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 $i $PWD/work/SRTM-3; done
  for f in ${PWD}/data/SRTM-3/*.hgt; do ./Terragear/hgtchop 3 "${f}" "${PWD}/work/SRTM-3"; done


Now you will get a lot of .arr.gz files in your work/SRTM-3/ directory. We need to convert these to the .fit.gz format. Run the commandline again with
Now you will get a lot of .arr.gz files in your work/SRTM-3/ directory. We need to convert these to the .fit.gz format. Run the commandline again with
88

edits

Navigation menu