Changes between Version 14 and Version 15 of Processing/SRTMDEMs
- Timestamp:
- Oct 21, 2010, 2:25:39 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Processing/SRTMDEMs
v14 v15 14 14 2. Unzip the downloaded zip file. ASTER data will contain two GeoTIFFs (you want the "_dem" one) - the file name refers to the lat/lon of the bottom-left corner of the tile. For SRTM data, descend into the directory structure to find the file w001001.adf - this holds the actual data, though you can't move it without the rest of the directory structure. 15 15 16 3. Fire up Grass. Select a location in lat/long projection using WGS84 datum (create one if none avaialble), make a note of the selected location and mapset names. 16 If the ASTER data covers more than one tile, you will need to unzip lots of files - for convenience: 17 18 for zipfile in `ls *.zip`; do yes | unzip $zipfile; done 19 20 Each zipfile contains a file called Readme.pdf and piping yes into unzip lets us overwrite it each loop. 21 22 3. Fire up Grass. Select a location in lat/long projection using WGS84 datum (create one if none available), make a note of the selected location and mapset names. 17 23 18 24 4. Import the data file: … … 26 32 }}} 27 33 28 for multiple tiles, put in a simple loop e.g: 34 '''For multiple tiles''' 35 36 If the data you have downloaded spans multiple tiles, then you will need to run the above but inside a for loop like so: 29 37 30 38 {{{ 31 for tile in `ls * .tif`;39 for tile in `ls *_dem.tif`; 32 40 do r.in.gdal input=$tile output=$tile.aster; 33 41 done 34 42 }}} 35 43 44 Once this is done, we need to stick all of the tifs together. First run 45 46 {{{ 47 g.mremove rast=* 48 }}} 49 50 This will list all of the tiles you have just read in. The output should look something like: 51 52 {{{ 53 Collecting map names for current mapset <Your_Mapset>... 54 The following files would be deleted: 55 g.remove rast=ASTGTM_N63W017_dem.tif.aster,ASTGTM_N63W018_dem.tif.... 56 }}} 57 58 I will refer to the comma separated list after "rast=" as TILELIST from hereon - This is the bit you need. 59 60 Now run 61 {{{ 62 g.region rast=TILELIST 63 }}} 64 65 And finally, 66 67 {{{ 68 r.patch input=TILELIST output=some_name 69 }}} 70 71 Write down some_name somewhere - you will need it in a minute. 72 36 73 5. Quit Grass and then start it up again. Select a location using UTM projection for the target area or create one if none is available - make sure you've got the right UTM zone. Note you can also use whatever other projection you want, but this guide assumes you want UTM. 74 75 Check [http://www.gpsinformation.org/utm-zones.gif] For the UTM zone 37 76 38 77 6. Use a conversion utility (eg see the spreadsheet at [http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM#Spreadsheet http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM#Spreadsheet]) to determine the boundaries of the target flight in meters within the selected UTM zone. If the flight spans two or more UTM zones, you will have to calculate the offsets appropriate to work out the east and west boundaries of the area. eg. If western boundary is zone 32 and eastern boundary is zone 33, for eastern value use zone 32, add 750000 to value from spreadsheet 39 78 to find eastings relative to zone 32 bound. 79 80 6-alternative. Once all of the 40 81 41 82 7. Set active region to calculated eastings/northings using: