Pietro wrote:
> Perhaps we could decorate the function with contextmanager:
That's an option, but it complicates matters in the (probably more
common) case where you just want to use a single temporary region for
the entire script.
--
Glynn Clements
> The main issue with use_temp_region() is that the clean-up function
> uses the current value of the environment variable to determine which
> region to delete.
>
> This could be fixed by passing a lambda to atexit.register(), e.g.
>
> def use_temp_region():
> name = "tmp.%s.%d" %
Vaclav Petras wrote:
> > Does this function mean that: while concurrent r.basin runs on different
> > CPUs in the same mapset, there is no interefering by region settings change
> > interefering?
>
> Setting WIND_OVERRIDE (environmental variable) will happen for the current
> process, so it
On 12/04/16 11:29, Helmut Kudrnovsky wrote:
wenzeslaus wrote
On Mon, Apr 11, 2016 at 5:19 PM, Helmut Kudrnovsky
hellik@
wrote:
I see, then it's easier to fix the script and use grass.use_temp_region
From the manual:
script.core.use_temp_region()[source]¶
Copies the current region
wenzeslaus wrote
> On Mon, Apr 11, 2016 at 5:19 PM, Helmut Kudrnovsky
> hellik@
> wrote:
>
>> > I see, then it's easier to fix the script and use grass.use_temp_region
>>
>> From the manual:
>>
>> script.core.use_temp_region()[source]¶
>> Copies the current region to a temporary region with
On Mon, Apr 11, 2016 at 5:19 PM, Helmut Kudrnovsky wrote:
> > I see, then it's easier to fix the script and use grass.use_temp_region
>
> From the manual:
>
> script.core.use_temp_region()[source]¶
> Copies the current region to a temporary region with “g.region save=”, then
>
Anna Petrášová wrote
> On Mon, Apr 11, 2016 at 4:46 PM, Helmut Kudrnovsky
> hellik@
> wrote:
>> Anna Petrášová wrote
>>> On Mon, Apr 11, 2016 at 4:04 PM, Helmut Kudrnovsky
>>
>>> hellik@
>>
>>> wrote:
Hi,
in a parallelized python script it is needed to do the parallelized
On Mon, Apr 11, 2016 at 4:46 PM, Helmut Kudrnovsky wrote:
> Anna Petrášová wrote
>> On Mon, Apr 11, 2016 at 4:04 PM, Helmut Kudrnovsky
>
>> hellik@
>
>> wrote:
>>> Hi,
>>>
>>> in a parallelized python script it is needed to do the parallelized jobs
>>> in
>>> different mapsets as
Anna Petrášová wrote
> On Mon, Apr 11, 2016 at 4:04 PM, Helmut Kudrnovsky
> hellik@
> wrote:
>> Hi,
>>
>> in a parallelized python script it is needed to do the parallelized jobs
>> in
>> different mapsets as region settings are changed during calculations.
>
> are you sure you need separate
On Mon, Apr 11, 2016 at 4:04 PM, Helmut Kudrnovsky wrote:
> Hi,
>
> in a parallelized python script it is needed to do the parallelized jobs in
> different mapsets as region settings are changed during calculations.
are you sure you need separate mapsets? You can also just use
Hi,
in a parallelized python script it is needed to do the parallelized jobs in
different mapsets as region settings are changed during calculations.
Any hints how to create temporary mapsets? Already existing pygrass /
pyscript functions?
thanks
-
best regards
Helmut
--
View this
11 matches
Mail list logo