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
d1acf41d
Commit
d1acf41d
authored
Oct 18, 2016
by
Manuel Grizonnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: replace gdal warp with warp API
parent
98fd445d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
python/s2snow/snow_detector.py
python/s2snow/snow_detector.py
+6
-4
No files found.
python/s2snow/snow_detector.py
View file @
d1acf41d
...
...
@@ -221,10 +221,12 @@ class snow_detector :
max_res
=
max
(
gb_resolution
,
rb_resolution
,
sb_resolution
)
print
"cubic resampling to "
+
str
(
max_res
)
+
" meters."
call_subprocess
([
"gdalwarp"
,
"-overwrite"
,
"-r"
,
"cubic"
,
"-tr"
,
str
(
max_res
),
str
(
max_res
),
gb_path_extracted
,
gb_path_resampled
])
call_subprocess
([
"gdalwarp"
,
"-overwrite"
,
"-r"
,
"cubic"
,
"-tr"
,
str
(
max_res
),
str
(
max_res
),
rb_path_extracted
,
rb_path_resampled
])
call_subprocess
([
"gdalwarp"
,
"-overwrite"
,
"-r"
,
"cubic"
,
"-tr"
,
str
(
max_res
),
str
(
max_res
),
sb_path_extracted
,
sb_path_resampled
])
#gdal.Warp(gb_path_resampled,gb_path_extracted,resampleAlg = gdal.GRIORA_Cubic, xRes = max_res,yRes = max_res)
#call_subprocess(["gdalwarp", "-overwrite","-r","cubic","-tr", str(max_res),str(max_res),gb_path_extracted,gb_path_resampled])
#call_subprocess(["gdalwarp", "-overwrite","-r","cubic","-tr", str(max_res),str(max_res),rb_path_extracted,rb_path_resampled])
#call_subprocess(["gdalwarp", "-overwrite","-r","cubic","-tr", str(max_res),str(max_res),sb_path_extracted,sb_path_resampled])
gdal
.
Warp
(
gb_path_resampled
,
gb_path_extracted
,
resampleAlg
=
gdal
.
GRIORA_Cubic
,
xRes
=
max_res
,
yRes
=
max_res
)
gdal
.
Warp
(
rb_path_resampled
,
rb_path_extracted
,
resampleAlg
=
gdal
.
GRIORA_Cubic
,
xRes
=
max_res
,
yRes
=
max_res
)
gdal
.
Warp
(
sb_path_resampled
,
sb_path_extracted
,
resampleAlg
=
gdal
.
GRIORA_Cubic
,
xRes
=
max_res
,
yRes
=
max_res
)
else
:
gb_path_resampled
=
gb_path_extracted
rb_path_resampled
=
rb_path_extracted
...
...
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