-
Notifications
You must be signed in to change notification settings - Fork 1
/
SizeRaster.py
37 lines (28 loc) · 1.2 KB
/
SizeRaster.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- coding: utf-8 -*-
"""
We follow the GPLv2.
Disclaim: Though authors can use it in their research and
applications, there is no any gurantee or implicit claiming
for its rightness. It is on users' challenge.
refs :
Li, Q. and Delher S. A. 2018. SizerPy: a Python tool for resizing raster
data by interpolation in the eigenspace, Computers & geosciences, xxx,
p. xx-xx
li, Q. and Dehler S. A. 2015. Inverse Spatial principal component analysis
for geophysical data interpolation. Journal of Applied Geophysics, 115,
p.79-91.
authors: Qingmou Li and Sonya A. Dehler
Natrual Resourcese of Canada
"""
import SizerPy as sp
if __name__ == '__main__':
'''
demonstrate of resizing (GDAL) raster data set by calling SizerPy
'''
args=sp.RasterParser() #get parameters
inRasterObj = sp.SizeRaster(args.inputRaster) #initialize object
inRasterObj.SizeBands(args.outRaster, factor=args.factor, \
d1Interpolate = args.d1Interpolate) #resizing and saving rasters
print 'done'