Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Remote Modules
let-it-snow
Commits
8142e880
Commit
8142e880
authored
Jul 26, 2016
by
Manuel Grizonnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: use overwrite option with gdalwarp
parent
234b238d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/s2snow/snow_detector.py
python/s2snow/snow_detector.py
+2
-2
No files found.
python/s2snow/snow_detector.py
View file @
8142e880
...
...
@@ -320,11 +320,11 @@ class snow_detector :
geotransform
=
dataset
.
GetGeoTransform
()
#resample red band using multiresolution pyramid
call_subprocess
([
"gdalwarp"
,
"-r"
,
"bilinear"
,
"-ts"
,
str
(
xSize
/
self
.
rf
),
str
(
ySize
/
self
.
rf
),
self
.
redBand_path
,
op
.
join
(
self
.
path_tmp
,
"red_coarse.tif"
)])
call_subprocess
([
"gdalwarp"
,
"-
overwrite"
,
"-
r"
,
"bilinear"
,
"-ts"
,
str
(
xSize
/
self
.
rf
),
str
(
ySize
/
self
.
rf
),
self
.
redBand_path
,
op
.
join
(
self
.
path_tmp
,
"red_coarse.tif"
)])
#Resample red band nn
#FIXME: use MACCS resampling filter contribute by J. Michel here
call_subprocess
([
"gdalwarp"
,
"-r"
,
"near"
,
"-ts"
,
str
(
xSize
),
str
(
ySize
),
op
.
join
(
self
.
path_tmp
,
"red_coarse.tif"
),
op
.
join
(
self
.
path_tmp
,
"red_nn.tif"
)])
call_subprocess
([
"gdalwarp"
,
"-
overwrite"
,
"-
r"
,
"near"
,
"-ts"
,
str
(
xSize
),
str
(
ySize
),
op
.
join
(
self
.
path_tmp
,
"red_coarse.tif"
),
op
.
join
(
self
.
path_tmp
,
"red_nn.tif"
)])
#edit result to set the resolution to the input image resolution
#TODO need to find a better solution and also guess the input spacing (using maccs resampling filter)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment