Skip to content

Commit

Permalink
Update SDS_download.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kvos committed Aug 29, 2024
1 parent 8384601 commit 38fc72a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions coastsat/SDS_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,14 @@ def get_metadata(inputs):
# read them and extract the metadata info
with open(os.path.join(filepath_meta, im_meta), 'r') as f:
filename = f.readline().split('\t')[1].replace('\n','')
tilename = f.readline().split('\t')[1].replace('\n','')
epsg = int(f.readline().split('\t')[1].replace('\n',''))
next_line = f.readline().split('\t')[1].replace('\n','')
# if statement to be compatible with older version without tilename
if next_line.isdigit():
tilename = 'NA'
epsg = next_line
else:
tilename = next_line
epsg = int(f.readline().split('\t')[1].replace('\n',''))
acc_georef = f.readline().split('\t')[1].replace('\n','')
im_quality = f.readline().split('\t')[1].replace('\n','')
im_width = int(f.readline().split('\t')[1].replace('\n',''))
Expand Down

0 comments on commit 38fc72a

Please sign in to comment.