diff --git a/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.html b/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.html index 95e85ef85b..e0e3826fb4 100644 --- a/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.html +++ b/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.html @@ -10,6 +10,10 @@

DESCRIPTION

reduced by the pattern_file option. In this option, a regular expression for filtering the file names should be given, e.g. "MSIL2A.*T32VNR_2019" for importing only level 2A products for tile T32VNR from 2019. +

+By default i.sentinel.import imports the full scene. Optionally, the +import can be reduced to the computational region extent with +extent=region.

Note that in the case that spatial reference system of input data differs diff --git a/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py b/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py index 06fbe63fa1..9d91c04134 100644 --- a/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py +++ b/grass7/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py @@ -42,6 +42,17 @@ #% guisection: Filter #%end #%option +#% key: extent +#% type: string +#% required: no +#% multiple: no +#% options: input,region +#% answer: input +#% description: Output raster map extent +#% descriptions: region;extent of current region;input;extent of input map +#% guisection: Filter +#%end +#%option #% key: memory #% type: integer #% required: no @@ -215,9 +226,15 @@ def import_products(self, reproject=False, link=False, override=False): module = 'r.import' args['resample'] = 'bilinear' args['resolution'] = 'value' + args['extent'] = options['extent'] else: module = 'r.in.gdal' args['flags'] = 'o' if override else None + if options['extent'] == 'region': + if args['flags']: + args['flags'] += 'r' + else: + args['flags'] = 'r' for f in self.files: if not override and (link or (not link and not reproject)):