[GRASS-dev] r.cross fails on G7?

Glynn Clements glynn at gclements.plus.com
Fri Mar 1 07:40:12 PST 2013


Nikos Alexandris wrote:

> > r.cross fails on G7 while it works fine in G6.
> 
> > G7:
> > g.version -r
> > GRASS 7.0.svn (2013)
> > libgis Revision: 52468
> 
> I tested this in another machine -- the same G7 revision.  r.cross justs 
> "waits...." -- no action at all.

FWIW, it works for me; sort of.

However: I note that it generates a distinct category for each cell
which is null in all inputs. If the number of cells is large and the
inputs contain many null cells, this could result in memory exhaustion
and/or extreme computation times.

I believe that the problem is due to an incomplete conversion from the
4.x G_get_map_row() function (which maps null to zero) to the 7.0
Rast_get_c_row() function (which leaves null as-is, i.e. -2^31). I.e. 
it now reads nulls as nulls (instead of zeros) but doesn't actually
make any attempt to deal with the nulls which it gets.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list