Project

General

Profile

Download (1.84 KB) Statistics
| Branch: | Revision:
1
#! /bin/sh
2
################################################################################
3
# script Name: mosaicNwHemiCgiar30ArcSecBL.sh
4
# This script constructs the CIGAR SRTM image mosaic for the Northweetern Hemisphere
5
# quadrant of the global mosaic
6
# 
7
# Author: Rick Reeves, NCEAS June 2, 2011
8
#
9
#
10
# NOTE: We are using SRTM version 4.1 data distributed by CGIAR (6001 x 6001 tiles)
11
# Determining the -ts (row, column # cells): 
12
# 1) Look at the first line of corresponding .vrt file: contains the spanning extent 
13
# (# rows, columns) of all image tiles in the virtual mosaic, as well as the pixel
14
# resolution in 'native units' for the spatial reference frame (in our case, 
15
# the geographic coordinate system and decimal degrees).
16
# Example for this file: 
17
#
18
# <GeoTransform> -1.8000041666668000e+02,  8.3333333333332894e-04,  0.0000000000000000e+00,
19
#  6.0000417247802311e+01,  0.0000000000000000e+00, -8.3333333333332894e-04</GeoTransform>
20
# The values 8.3333333333332894e-04 and -8.3333333333332894e-04 are the cell resolution
21
# in decimal cegrees: 3 arc-seconds, or approx 90 meters.
22
# <dataset rasterXSize="156001" rasterYSize="54001">: # cols and rows, respectively.
23
#
24
# The extent of the mosaic is fixed. To change the cell size, adjust the X and Y resolution.
25
# In the present case, to set cellsize at 30 arcseconds, reduce the number of cells in
26
# X and Y by a factor of 10 - from 156001 and 54001 to 15601 and 5401. 
27
################################################################################
28
#
29
date
30
rm /home/reeves/active_work/OutProducts/WestHemi/NorthWest/NorthWestHemiCgiar_30ArcSecBL.img
31
gdalwarp -of HFA -ot Int16   -ts 15601 5401 -r bilinear -srcnodata -9999 -dstnodata -9999 \
32
/home/reeves/active_work/OutProducts/WestHemi/NorthWest/NorthWestHemiCgiarSrtm.vrt \
33
/home/reeves/active_work/OutProducts/WestHemi/NorthWest/NorthWestHemiCgiar_30ArcSecBL.img
34
date
(30-30/37)