[GRASS-dev] [GRASS GIS] #2055: r.in.gdal lacks flag "-r Limit import to the current region"

GRASS GIS trac at osgeo.org
Fri Jun 24 05:10:28 PDT 2016

#2055: r.in.gdal lacks flag "-r Limit import to the current region"
  Reporter:  neteler      |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.2.0
 Component:  Raster       |    Version:  svn-trunk
Resolution:               |   Keywords:  r.in.gdal, r.import
       CPU:  Unspecified  |   Platform:  Unspecified
Changes (by neteler):

 * keywords:  r.in.gdal => r.in.gdal, r.import
 * milestone:  7.0.5 => 7.2.0


 Replying to [comment:9 mmetz]:
 > Replying to [comment:8 veroandreo]:
 > > Adding a use case here to support the addition of -r flag to r.in.gdal
 > > I'm working with time series (2003-2013) of MODIS-Aqua L3 Chlorophyll
 concentration and Rrs data. Data is available globally
 (http://oceandata.sci.gsfc.nasa.gov/MODISA/Mapped/8Day/4km/chlor/), but I
 just need a small sample covering the argentinean sea. I have more than 40
 images per year, 10 years of data, 5 different products, ~150 Mb each.
 That's a lot of space for my notebook.

 ... now with Sentinel-2, we are in the multi-GB range per image scene
 (which itself can consist of up to 12 tiles, 13 channels)...

 > > I cannot loop over all data set cos i fill the disk completely... So,
 i have to go folder by folder uncompressing (original data are .bz2 hdf
 files), importing into grass, subseting, and then removing the global
 > >
 > > I could really use a flag to subset to the region extent on-the-fly
 when importing into grass and save disk space and time :)
 > Why not use r.external? This requires very little disk space. If you
 want to clip the import to the current region and delete the external
 raster data afterwards, you could use
 > {{{
 > r.external in=<name_of_input> out=<name_of_input>.tmp
 > r.mapcalc "<name_of_input> = <name_of_input>.tmp"
 > g.remove rast=<name_of_input>.tmp
 > }}}
 > granted that the current region is aligned to the input raster.
 > Be aware of several bands in the input raster.

 Proposal: adding the approach suggested above to r.import (simplifying the
 problem to some Python coding).

Ticket URL: <http://trac.osgeo.org/grass/ticket/2055#comment:12>
GRASS GIS <https://grass.osgeo.org>

More information about the grass-dev mailing list