Skip to content

Commit 6240302

Browse files
committed
switching to Copernicus Global 30m DEM as default
1 parent 8eaa7a5 commit 6240302

File tree

9 files changed

+28
-17
lines changed

9 files changed

+28
-17
lines changed

ost/generic/common_wrappers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ def ls_mask(infile, outfile, logfile, config_dict):
300300
f'-Poutput=\'{str(outfile)}\''
301301
)
302302

303+
print(command)
304+
303305
# run command and get return code
304306
return_code = h.run_command(command, logfile)
305307

ost/graphs/ard_json/grd.ceos.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"create_ls_mask": true,
2828
"apply_ls_mask": false,
2929
"dem": {
30-
"dem_name": "SRTM 1Sec HGT",
30+
"dem_name": "Copernicus 30m Global DEM",
3131
"dem_file": "",
3232
"dem_nodata": 0,
3333
"dem_resampling": "BILINEAR_INTERPOLATION",

ost/graphs/ard_json/grd.earth_engine.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"create_ls_mask": false,
2828
"apply_ls_mask": false,
2929
"dem": {
30-
"dem_name": "SRTM 1Sec HGT",
30+
"dem_name": "Copernicus 30m Global DEM",
3131
"dem_file": "",
3232
"dem_nodata": 0,
3333
"dem_resampling": "BILINEAR_INTERPOLATION",

ost/graphs/ard_json/grd.ost_gtc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"create_ls_mask": false,
2828
"apply_ls_mask": false,
2929
"dem": {
30-
"dem_name": "SRTM 1Sec HGT",
30+
"dem_name": "Copernicus 30m Global DEM",
3131
"dem_file": "",
3232
"dem_nodata": 0,
3333
"dem_resampling": "BILINEAR_INTERPOLATION",

ost/graphs/ard_json/grd.ost_rtc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"create_ls_mask": true,
2828
"apply_ls_mask": false,
2929
"dem": {
30-
"dem_name": "SRTM 1Sec HGT",
30+
"dem_name": "Copernicus 30m Global DEM",
3131
"dem_file": "",
3232
"dem_nodata": 0,
3333
"dem_resampling": "BILINEAR_INTERPOLATION",

ost/graphs/ard_json/slc.ost_gtc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"create_ls_mask": true,
4040
"dem": {
41-
"dem_name": "SRTM 1Sec HGT",
41+
"dem_name": "Copernicus 30m Global DEM",
4242
"dem_file": " ",
4343
"dem_nodata": 0,
4444
"dem_resampling": "BILINEAR_INTERPOLATION",

ost/graphs/ard_json/slc.ost_minimal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"create_ls_mask": false,
4040
"dem": {
41-
"dem_name": "SRTM 1Sec HGT",
41+
"dem_name": "Copernicus 30m Global DEM",
4242
"dem_file": "",
4343
"dem_nodata": 0,
4444
"dem_resampling": "BILINEAR_INTERPOLATION",

ost/graphs/ard_json/slc.ost_rtc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"create_ls_mask": true,
4040
"apply_ls_mask": false,
4141
"dem": {
42-
"dem_name": "SRTM 1Sec HGT",
42+
"dem_name": "Copernicus 30m Global DEM",
4343
"dem_file": "",
4444
"dem_nodata": 0,
4545
"dem_resampling": "BILINEAR_INTERPOLATION",

ost/s1/s1scene.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -788,23 +788,32 @@ def create_ard(self, infile, out_dir, subset=None, overwrite=False):
788788
# when outside SRTM
789789
center_lat = self._get_center_lat(infile)
790790
if float(center_lat) > 59 or float(center_lat) < -59:
791+
if 'SRTM' in self.ard_parameters['single_ARD']['dem']['dem_name']:
792+
793+
logger.info(
794+
'Scene is outside SRTM coverage. Snap will therefore use '
795+
'the Copernicus 30m Global DEM. '
796+
)
797+
798+
self.ard_parameters['single_ARD']['dem'][
799+
'dem_name'] = 'Copernicus 30m Global DEM'
800+
791801
logger.info(
792-
'Scene is outside SRTM coverage. Snap will therefore use '
793-
'the GETASSE30 DEM. Also consider to use a stereographic '
794-
'projection.'
802+
'The scene\'s location is towards the poles. '
803+
'Consider to use a stereographic projection.'
795804
)
805+
796806
epsg = input(
797-
'Please type the EPSG you want to project the output data or '
798-
'just press enter for keeping Lat/Lon coordinate system '
799-
'(e.g. 3413 for NSIDC Sea Ice Polar Stereographic North '
800-
'projection, or 3976 for NSIDC Sea Ice Polar Stereographic '
801-
'South projection'
807+
'Type an alternative EPSG code for the projection of the '
808+
'output data or just press enter for keeping Lat/Lon '
809+
'coordinate system (e.g. 3413 for NSIDC Sea Ice Polar '
810+
'Stereographic North projection, or 3976 for NSIDC Sea Ice '
811+
'Polar Stereographic South projection'
802812
)
813+
803814
if not epsg:
804815
epsg = 4326
805816

806-
self.ard_parameters['single_ARD']['dem'][
807-
'dem_name'] = 'GETASSE30'
808817
self.ard_parameters['single_ARD']['dem'][
809818
'out_projection'] = int(epsg)
810819

0 commit comments

Comments
 (0)