Skip to content

Commit

Permalink
i.modis.import: change cwd to input data dir (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
landam committed Jun 9, 2020
1 parent 90fe18c commit 6fb4fd0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grass7/imagery/i.modis/i.modis.import/i.modis.import.py
Expand Up @@ -406,6 +406,9 @@ def single(options, remove, an, ow, fil):
outname = outname.replace(' ', '_')
execmodis = convertModisGDAL(str(hdf), outname, spectr, res,
wkt=str(projwkt))

# produce temporary files in input folder
os.chdir(basedir)
try:
execmodis.run(quiet=True)
except:
Expand Down Expand Up @@ -494,6 +497,9 @@ def mosaic(options, remove, an, ow, fil):
res = None
execmodis = convertModisGDAL(str(hdf), out, spectr, res,
wkt=str(projwkt), vrt=True)

# produce temporary files in input folder
os.chdir(basedir)
try:
execmodis.run(quiet=True)
except:
Expand Down

0 comments on commit 6fb4fd0

Please sign in to comment.