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

David Finlayson david.p.finlayson at gmail.com
Sun Dec 3 02:58:04 EST 2006


FYI:

On Windows (at least with cmd.exe) piping goes to a temporary file before
being fed into the second program (I believe). Since the temp file may not
be on the same drive, you can wind up with mystery out-of-memory-errors on
large files. I don't know if Cygwin gets around this or if the new window's
shell will get around this limitation.

Piping binary data is unreliable (at least with Python) on Windows, but that
is another story.

David

On 12/1/06, Glynn Clements <glynn at gclements.plus.com> wrote:
>
>
> 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>
>
> _______________________________________________
> grassuser mailing list
> grassuser at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser
>



-- 
David Finlayson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20061202/76767211/attachment.html


More information about the grass-user mailing list