[GRASS-user] new r.in.xyz and r3.in.xyz abilities

Hamish hamish_b at yahoo.com
Wed Jun 20 04:55:11 PDT 2012


Hi everyone,


I have just checked in some code in trunk which may interest
some of you.

r.in.xyz now supports storing data from a data column other than
the "z" coordinate column. You could already fool the module by
putting another non-spatial data column there, but with the new
alternate value data column you can combine with the z-coordinate
range filtering to do things like look at backscatter values
between 1000 and 1500 meters elevation. Like the z-column, the
new alternate value column has associated scaling factor and
range filter options. (you can use both z- and value- filters and
scale factors all at once if you like)

The r.in.xyz loop is so tight that adding just the one extra if()
statement to it makes it run a few percent slower, but I think
the opportunities added by the new functionality makes it well
worth that cost.



Also in trunk I have added a new r3.in.xyz module for creating
3D raster volumes. It's a port of the shell script version for
grass 6 which can be found in the addons svn, but by using the
above enhancement to r.in.xyz it can store something more
interesting than just the z-value or count now, so becomes a
generally-useful building block for our 3D tool kit. It's a
python wrapper around r.in.xyz and r.to.rast3, and will run
parallelized if you tell it to. It doesn't add much overhead to
r.in.xyz, so is rather fast.


It was all very simple changes code wise, so I would nominate
it for backport to grass 6.4.x after some months of testing in
the development branches, if that is agreeable to the other devs.
(and then move the becomes-useful r3.in.xyz(.sh) to the main 6.x
suite from addons svn too)



hope to hear if you can do something neat with it,
Hamish


More information about the grass-user mailing list