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

GRASS GIS trac at osgeo.org
Thu Sep 15 12:17:52 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
--------------------------+---------------------------------

Comment (by mmetz):

 Replying to [comment:14 martinl]:
 > Replying to [comment:13 neteler]:
 > > The solution would be "lazy cutting", that is not cutting sharp to the
 boundary but allow for a small "extra". Essentially, like v.in.ogr
 behaves. Resampling is definitely undesired since we usually import as-is
 in r.in.gdal.
 > >
 > > Lines to look at:
 > >
 https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.in.gdal/main.c#L359
 >
 > Please try out attachment:r_in_gdal_2055.diff.

 Tests are missing:
  * if the current region and the input raster do not overlap, fatal error,
 but special care for !Lat/Lon locations
  * if the current region and the input raster overlap only partially,
 adjust the current region to avoid importing all-NULL rows/columns

 For !Lat/Lon, some kind of window mapping similar to
 `Rast__create_window_mapping()` in trunk/lib/raster/window_map.c would
 help. Otherwise, a current region with EW extents of e.g. -20,-10 and an
 input raster with EW extents of 0,360 will result in all NULL cells even
 though the current region is covered by the input raster.

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



More information about the grass-dev mailing list