[GRASS-dev] set computational region iteratively for each clump in a map

Moritz Lennert mlennert at club.worldonline.be
Mon Mar 6 09:48:14 PST 2017



Le 6 mars 2017 18:41:28 GMT+01:00, Yann <dr.yann.chemin at gmail.com> a écrit :
>Hi,
>
>I am having to process each clump individually and I need to set the 
>computational region successively to each of them. How can I do that? I
>
>thought about vectorizing and somehow select one polygon and set the 
>computational region to it... but a bit expensive in processing.


I imagine clumps are not rectangular ? The easiest is probably to define a mask for each clump, I.e. call r.mask at the beginning of each loop instance, using the clump map as input and the cat value of the clump you're working on as parameter.

Moritz

>
>Thank you,
>
>Yann
>
>_______________________________________________
>grass-dev mailing list
>grass-dev at lists.osgeo.org
>https://lists.osgeo.org/mailman/listinfo/grass-dev


More information about the grass-dev mailing list