[GRASS-user] Piping Commands
Alex Mandel
tech_dev at wildintellect.com
Mon Nov 23 16:04:18 EST 2009
I would consider it best practice to run 2 commands in sequence, storing
the intermediate product. It can save you a lot of time, help
troubleshoot data errors, make it easier to repeat your steps. You also
won't have to repeat step one if something goes wrong in step two.
An example
v.somecommand out=step1
v.anothercommand in=step1 out=step2
These can easily be turned into a script, and the layer names can be
variable derived if you want to loop through several places doing the
same process.
Alex
Pablo Carreira wrote:
> Hi, Javier!
>
> Let me explain:
> I have a very large vector of rivers, with many CATs. Here in Brazil we have a law that say that, in general, a 30m area aside of rivers should be preserved with trees.
> Them I look in a high resolution orbital image and where I find a portion river without trees I v.extract that portion of river, v.buffer 30m, v.patch that buffer to larger common vector of buffers, g.remove the buffer and the extracted vector.
>
> It is not a batch process, but I think it could be indeed scripted, and I would apreciate some help with that.
>
> Anyway, I still want to discover is if it is possible to pipe grass commands, I don't know much of programing but if I'm not wrong piping mean that the output of an application becomes the input of another application.
>
> Achim told me not to pipe, but I am a obstinate kind of person (I think most of us are)...
>
> ops, I almost forgot, in the company I use windows (becouse I can't use linux there), but at home I use Ubuntu linux.
>
> Regards
>
> Pablo Torres Carreira
>
>
>
>
> From: fjgarciaprieto at hotmail.com
> To: pablotcarreira at hotmail.com
> Subject: RE: [GRASS-user] Piping Commands
> Date: Mon, 23 Nov 2009 19:28:29 +0000
>
>
>
>
>
>
>
>
> Hi, I'm not an expert or anything else, but maybe I can help you.
>
> You are using Windows or Linux?
>
> Sometime ago I have to upload a large number of images (Ortophotos) to grass (more than the command aloud me and I use a Linux script to do that performed over the basis of processing each group of files and then perform another operations on the result.
>
> Is this what are you looking for?
>
> From: pablotcarreira at hotmail.com
> To: grass-user at lists.osgeo.org
> Date: Mon, 23 Nov 2009 12:56:46 -0200
> Subject: [GRASS-user] Piping Commands
>
>
>
>
>
>
>
>
>
> Hi,
>
> I want to do the following:
> v.extract some lines from a vector and them
> v.buffer those lines
>
> How do I pipe these commands?
>
>
>
>
>
> Pablo Torres Carreira
>
>
>
> Chegou o Windows 7: Incrivelmente simples! Clique e conheça.
> Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
> _________________________________________________________________
> Novo site do Windows Live: Novidades, dicas dos produtos e muito mais. Conheça!
> http://www.windowslive.com.br/?ocid=WindowsLive09_MSN_Hotmail_Tagline_out09
>
>
More information about the grass-user
mailing list