Changes between Version 14 and Version 15 of Processing/SRTMDEMs


Ignore:
Timestamp:
Oct 21, 2010, 2:25:39 PM (14 years ago)
Author:
anch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Processing/SRTMDEMs

    v14 v15  
    14142. 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.
    1515
    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.
     16If the ASTER data covers more than one tile, you will need to unzip lots of files - for convenience:
     17
     18for zipfile in `ls *.zip`; do yes | unzip $zipfile; done
     19
     20Each zipfile contains a file called Readme.pdf and piping yes into unzip lets us overwrite it each loop.
     21
     223. 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.
    1723
    18244. Import the data file:
     
    2632}}}
    2733
    28 for multiple tiles, put in a simple loop e.g:
     34'''For multiple tiles'''
     35
     36If the data you have downloaded spans multiple tiles, then you will need to run the above but inside a for loop like so:
    2937
    3038{{{
    31 for tile in `ls *.tif`;
     39for tile in `ls *_dem.tif`;
    3240do r.in.gdal input=$tile output=$tile.aster;
    3341done
    3442}}}
    3543
     44Once this is done, we need to stick all of the tifs together.  First run
     45
     46{{{
     47g.mremove rast=*
     48}}}
     49
     50This will list all of the tiles you have just read in.  The output should look something like:
     51
     52{{{
     53Collecting map names for current mapset <Your_Mapset>...
     54The following files would be deleted:
     55g.remove rast=ASTGTM_N63W017_dem.tif.aster,ASTGTM_N63W018_dem.tif....
     56}}}
     57
     58I will refer to the comma separated list after "rast=" as TILELIST from hereon - This is the bit you need.
     59
     60Now run
     61{{{
     62g.region rast=TILELIST
     63}}}
     64
     65And finally,
     66
     67{{{
     68r.patch input=TILELIST output=some_name
     69}}}
     70
     71Write down some_name somewhere - you will need it in a minute.
     72
    36735. 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
     75Check [http://www.gpsinformation.org/utm-zones.gif] For the UTM zone
    3776
    38776. 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
    3978to find eastings relative to zone 32 bound.
     79
     806-alternative.  Once all of the
    4081
    41827. Set active region to calculated eastings/northings using: