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

Nikos Alexandris nik at nikosalexandris.net
Fri Mar 1 08:19:16 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.

Some attempts that _work_ on G7, are projected in

+proj=utm +no_defs +zone=34 +a=6378137 +rf=298.257223563  
+towgs84=0.000,0.000,0.000 +to_meter=1

Crossing maps composed of

- 182402720 and 165183040 cells


- 165183040 and 165183040

Total cells in computational region are

- 458870596 (30m res)
- 165234916 (50m res)

But, 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)

Hope this info is of some use.
Best, Nikos

More information about the grass-dev mailing list