[GRASS-user] Speeding Up Reprojection of Large Raster Maps
Glynn Clements
glynn at gclements.plus.com
Tue Mar 13 03:22:05 EDT 2012
Daniel Victoria wrote:
> I thinkg you have to use "poors man parallelization"... That is, split
> the work and issue multiple commands separately.
>
> So I'd try splitting the large raster into small chunks and then
> projecting each one separately, sending the project command to the
> background. The problem is that, if the grass command changes the
> region settings, things might not work.
r.proj doesn't change the region.
Processing the map in chunks requires setting a different region for
each command. That can be done by creating named regions and using the
WIND_OVERRIDE environment variable, e.g.:
g.region ... save=region1
g.region ... save=region2
...
WIND_OVERRIDE=region1 r.proj ... &
WIND_OVERRIDE=region2 r.proj ... &
...
The main factor which is likely to affect parallelism is the fact that
the processes won't share their caches, so there'll be some degree of
inefficiency if there's substantial overlap between the source areas
for the processes.
If you have more than one such map to project, processing entire maps
in parallel might be a better choice (so that you get N maps projected
in 10 hours rather than 1 map in 10/N hours).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list