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

GRASS GIS trac at osgeo.org
Wed Mar 5 13:00:36 PST 2014


#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.0.0                    
Component:  Raster       |     Version:  svn-trunk                
 Keywords:  r.in.gdal    |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by 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. 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 files...
 >
 > 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.

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



More information about the grass-dev mailing list