[GRASS-user] can r.in.xyz get input from STDIN?

Glynn Clements glynn at gclements.plus.com
Fri Dec 1 16:43:24 EST 2006


Hamish wrote:

> > i'm getting xyz data from the grass command prompt using a query like:
> > echo "select x,y,z from...." | db.select  > outfile.xyz
> > 
> > then reading into grass using:
> > r.in.xyz input=outfile.xyz ....
> > 
> > just wondering if i can do this in one step by piping my select output
> > directly into r.in.xyz?
> > 
> > (i suppose i could just right a wrapper script to do this if i can't
> > do it directly)
> 
> No, you can't right now. But it is a planned feature.  (input="-")

r.in.xyz may use multiple passes, and thus requires the ability to
rewind the input.

Allowing it to use stdin would be easy enough, but stdin would still
need to refer to a file (a pipe wouldn't work), so there isn't a lot
of point.

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




More information about the grass-user mailing list