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

GRASS GIS trac at osgeo.org
Mon Feb 27 13:31:36 PST 2017


#2055: r.in.gdal lacks flag "-r Limit import to the current region"
--------------------------+---------------------------------
  Reporter:  neteler      |      Owner:  martinl
      Type:  enhancement  |     Status:  assigned
  Priority:  normal       |  Milestone:  7.2.1
 Component:  Raster       |    Version:  svn-trunk
Resolution:               |   Keywords:  r.in.gdal, r.import
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by mmetz):

 The patch attachment:r.in.gdal_region.patch limits import to the current
 region and does lat/lon wrapping. The patch is automatically doing region
 cropping (like r.proj), i.e. only the part overlapping with the current
 region is imported. The patch uses window mapping equivalent to the raster
 lib.

 Test commands:

 {{{
 # create a region that crosses 180E
 g.region -p n=80 s=-80 w=90 e=270 res=1

 # create a test map
 r.mapcalc "test = 1"

 # export
 r.out.gdal in=test out=test.tif

 # set region to a part of the test map
 g.region -p n=80 s=-80 w=0 e=180 res=1

 # import test map
 r.in.gdal in=test.tif out=test1 -r

 # check imported map, both visually and with r.info

 # set region to -180, 180, should import the whole test map with a gap in
 the middle
 g.region -p n=80 s=-80 w=-180 e=180 res=1

 # import test map
 r.in.gdal in=test.tif out=test2 -r

 # check imported map, both visually and with r.info
 }}}

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



More information about the grass-dev mailing list