[GRASS-dev] [GRASS GIS] #2676: r.neighbors on large rasters
GRASS GIS
trac at osgeo.org
Thu May 14 09:23:29 PDT 2015
#2676: r.neighbors on large rasters
--------------------------+---------------------------------------
Reporter: dnewcomb | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.neighbors large rasters
CPU: x86-64 | Platform: Linux
--------------------------+---------------------------------------
Comment (by dnewcomb):
Replying to [comment:1 glynn]:
> Replying to [ticket:2676 dnewcomb]:
>
> > In main.c , line 139 I see :
> > int i , n;
> >
> > I assume that this means that r.neighbors is limited to rasters with
the number of cells in the 32 bit integer range?
>
> If it is, it has nothing to do with above declaration. "i" will never
exceed the number of outputs, while "n" will never exceed the number of
cells in the neighbourhood.
>
> r.neighbours operates row-by-row, only holding as many rows as are in
the neighbourhood, and for method=average it isn't maintaining category
data, so it shouldn't have any problems with rasters with more than 2!^31
cells. At least, there's no more reason for r.neighbors to have such
issues than any other raster module.
>
> What are the actual dimensions (rows x columns) of the current region?
(The dimensions of the input map aren't directly relevant).
Sorry, rookie mistake.
The region stats are these.
rows: 1969532
cols: 1875705
cells: 3694261020060
I had used r.external -e to expand the extent of the region to include the
linked raster.
Setting the region to match the raster gives me this size region.
rows: 440046
cols: 830958
cells: 365659744068
This seems to be working so far.
Sorry for the noise.
Kind of curious what is the upper limit for the command, though.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2676#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list