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

Nikos Alexandris nik at nikosalexandris.net
Sat Mar 2 07:18:40 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.

Glynn Clements wrote:
> > 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.

[..]

> ...r.cross might "result in memory exhaustion and/or extreme computation
> times" in G7, in a Location defined by

> +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +no_defs +a=6378137
> +rf=298.257222101 +towgs84=0,0,0,0,0,0,0 +to_meter=1

> Crossing maps composed of
> - 263672500 and 263672500
> 
> Total cells in computational region are
> 65914160 (100m res)

Oh... now I see it: more important I guess is the number of NULL cells of the 
maps to be crossed! FWIW, they  were/are (in the failing case):
61149574 and 63837480 

Thanks again, Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20130302/0c5d86f7/attachment.pgp>


More information about the grass-dev mailing list