[GRASS-user] Complex raster calculations with GRASS....

Andranik Hayrapetyan andranik.h89 at gmail.com
Thu Dec 13 23:18:04 PST 2012


Hi, thank you for your responce.

I am copying here my post on mailing list about how...

*So, here are two versions of script, of parallel GRASS jobs with "split
map into spatial chunks (possibly with overlap to gain smooth results)"
approach.*
*
*
*First script ( script1.bash ) is splitting the region in specified number
of smaller regions, do the calculation ( calculating NDVI for example ) in
parallel way, overlay parts together and remove all small parts and regions.
*
*
*
*Second script ( script2.bash ) is doing the same job until r.patch part.
here r.patch is being done in a kind of cascade way. When suppose you have
8 parts that need to be patched r.patch is patching 1 with 2 ,  3 with 4, 5
with 6 and 7 with 8 parallelly and creates 4 parts, after these 4 parts are
being patched the same parallel way. The idea was interesting but actually
it is taking longer then in first way and take more resources.*
*
*
*So I would like to ask people who are interested in this question to  help
me to understand, if there is another approach in this case to overlay
chunks together, or may be export all chunks in one file.  because my final
goal is to import image, do the calculation and export the image. Finally
it should work as underlying script for this GRASS - PyWPS web frontend
http://93.187.165.125/gisservices/ .*
*
*
*Any help will be appreciated.*
*
*
*Regards,*
*Andranik *
*
*
And you can see attached scripts.

There is no meaning which module I will use, r.mapcalc or others. I just
need a real life calculation that is complex inougth for me to achive
performance with running it in parallel. I will try modules you told me.
Thank you

On Fri, Dec 14, 2012 at 1:31 AM, Markus Neteler <neteler at osgeo.org> wrote:

> On Tue, Dec 11, 2012 at 2:59 PM, Andranik Hayrapetyan
> <andranik.h89 at gmail.com> wrote:
> > Good day,
> >
> > I am trying implement paralisation for some grass task and understand in
> > what cases parallelisation is needed and where it is not.
> > Until now I was doing experiments with calculation of NDVI with
> r.mapcalc.
> > But as my experiments shows, calculation of NDVI is too simple task to
> > parallelise it.
>
> How did you implement it?+
>
> > Can you point me to a real life calculation which is more complex than
> NDVI
> > ?  For example, if calculation of NDVI takes 10 minutes to complete on
> > specified raster, I want to know a real life calculation that takes,
> let's
> > say, 30 minutes ...
>
> You mean with r.mapcalc? Otherwise cost surfaces or watershed calculation
> may
> be interesting.
>
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20121214/435baa4e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: script1.bash
Type: application/octet-stream
Size: 2558 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20121214/435baa4e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: script2.bash
Type: application/octet-stream
Size: 2550 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20121214/435baa4e/attachment-0001.obj>


More information about the grass-user mailing list