Skip to content

Commit

Permalink
i.sentinel.coverage: print result when no output defined (#427)
Browse files Browse the repository at this point in the history
i.sentinel.coverage: print result when no output defined
  • Loading branch information
neteler committed Feb 11, 2021
1 parent ab25655 commit 761191a
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -95,11 +95,11 @@
#%end

#%rules
#% required: names, output
#% collective: start,end
#% excludes: names,start,end,clouds,producttype
#%end


import atexit
import os
from datetime import datetime, timedelta
Expand Down Expand Up @@ -182,7 +182,8 @@ def get_size(vector):
tmpvector = 'tmp_getsize_%s' % str(os.getpid())
rm_vectors.append(tmpvector)
grass.run_command(
'g.copy', vector="%s,%s" % (vector, tmpvector), quiet=True)
'g.copy', vector="%s,%s" % (vector, tmpvector), overwrite=True,
quiet=True)
if len(grass.vector_db(tmpvector)) == 0:
grass.run_command('v.db.addtable', map=tmpvector, quiet=True)
grass.run_command(
Expand Down Expand Up @@ -333,6 +334,9 @@ def main():
grass.message(_(
"Name of Sentinel scenes are written to file <{}>").format(
output))
else:
grass.message(_('The following scenes were found:'))
grass.message(_('\n'.join(name_list_updated)))

# TODO Sentinel-1 select only "one" scene (no overlap)

Expand Down

0 comments on commit 761191a

Please sign in to comment.