just looking through the i.fusion.brovey script I see that the cleanup()
section resets the region to the temporary region file instead removing
it. Which, AFAICT, is a noop and leaves a saved region file behind.
It in not important that the WIND_OVERRIDE variable is not unset there --
that goes away automatically as soon as the script exits.
Also, it is unclear to me if the "clone current region" step is really
needed before setting WIND_OVERRIDE and using the new region file. I
notice i.in.spotvgt doesn't bother to do that.
ie can WIND_OVERRIDE legally point to a region wind file which does not
yet exist?
> ie can WIND_OVERRIDE legally point to a region wind file which does not
yet exist?
It depends upon the situation, but in most cases, no. Anything which tries
to read the window (which lots of functions do implicitly) will fail if
WIND_OVERRIDE references a non-existent region.
In particular, g.region calls G_get_window() unless -d is given (any
command line settings override specific components of the current region),
which will fail if WIND_OVERRIDE is set but the region doesn't exit.