1
|
#! /bin/sh
|
2
|
################################################################################
|
3
|
# script Name: mosaicSwHemiCgiar30ArcSecBL.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 12, 2011
|
8
|
#
|
9
|
# NOTE: We are using SRTM version 4.1 data distributed by CGIAR (6001 x 6001 tiles)
|
10
|
# Determining the -ts (row, column # cells):
|
11
|
# 1) Look at the first line of corresponding .vrt file: contains the spanning extent
|
12
|
# (# rows, columns) of all image tiles in the virtual mosaic, as well as the pixel
|
13
|
# resolution in 'native units' for the spatial reference frame (in our case,
|
14
|
# the geographic coordinate system and decimal degrees).
|
15
|
# Example for this file:
|
16
|
#
|
17
|
# <GeoTransform> -1.8000041666668000e+02, 8.3333333333332894e-04, 0.0000000000000000e+00,
|
18
|
# 6.0000417247802311e+01, 0.0000000000000000e+00, -8.3333333333332894e-04</GeoTransform>
|
19
|
# The values 8.3333333333332894e-04 and -8.3333333333332894e-04 are the cell resolution
|
20
|
# in decimal cegrees: 3 arc-seconds, or approx 90 meters.
|
21
|
# <dataset rasterXSize="156001" rasterYSize="54001">: # cols and rows, respectively.
|
22
|
# <VRTDataset rasterXSize="90001" rasterYSize="90001">
|
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 90001 and cw9000154001 to 9001 and 9001.
|
27
|
################################################################################
|
28
|
#
|
29
|
date
|
30
|
rm /home/reeves/active_work/OutProducts/WestHemi/SouthWest/SouthWestHemiCgiar_30ArcSecBL.img
|
31
|
gdalwarp -of HFA -ot Int16 -ts 18001 9001 -r bilinear -srcnodata -9999 -dstnodata -9999 \
|
32
|
/home/reeves/active_work/OutProducts/WestHemi/SouthWest/SouthWestHemiCgiarSrtm.vrt \
|
33
|
/home/reeves/active_work/OutProducts/WestHemi/SouthWest/SouthWestHemiCgiar_30ArcSecBL.img
|
34
|
date
|