[GRASS5] setting the initial region

I believe that GRASS is made more difficult by the requirement to set
the working region at start-up time. I propose that the initial
region should be "none". Every program that uses the region should
see that there is no region, and generate one that covers all the
available data.

In other words, if the GRASS user does not set a region, that means
that they wish to operate on the entire area covered by their data.

In other words, a sensible default.

I will write the code to make this change. I'm proposing it here
first so that I don't waste my time doing something stupid, or doing
something that the GRASS maintainers will refuse to accept on
principle. I can, of course, understand a refual based on the merits
of the submitted code. Code can be fixed, but if the problem
statement is not accepted, writing code is a waste of time.

--
--My blog is at angry-economist.russnelson.com | Don't like poverty?
Crynwr sells support for free software | PGPok |
521 Pleasant Valley Rd. | +1 315-323-1241 cell | Try economic freedom!
Potsdam, NY 13676-3213 | +1 212-202-2318 VOIP |

Russell Nelson said:

I believe that GRASS is made more difficult by the requirement to set
the working region at start-up time. I propose that the initial
region should be "none". Every program that uses the region should
see that there is no region, and generate one that covers all the
available data.

In other words, if the GRASS user does not set a region, that means
that they wish to operate on the entire area covered by their data.

In other words, a sensible default.

So, you want the default to be set from the particular map being processed
by whatever module wants a region? How would this be handled when a module
has more than one input map? Wouldn't this ultimately lead to a great deal
of entropy in the user's database with potentially many different unnamed
regions being propagated onto output files, as it were?

Setting a region at start-up has the advantage of helping to keep all
useful regions organized and named. If I wanted to try to save a step and
thought I'd like a common default region, I think I'd script the start-up
to run <g.region -d>.

-- Mark

Mark P. Line
Polymathix
San Antonio, TX

Mark P. Line writes:
> has more than one input map? Wouldn't this ultimately lead to a great deal
> of entropy in the user's database with potentially many different unnamed
> regions being propagated onto output files, as it were?

I would like people to be able to load data, and have GRASS discern
the correct region for that data. I expect that sophisticated users
will continue to find value in setting a default region other than the
one that GRASS has discerned. Naive users will be rewarded with
success, sophisticated users will not be impeded. Everybody happy!

> Setting a region at start-up has the advantage of helping to keep all
> useful regions organized and named.

It has the disadvantage of presenting the naive user with a question
which is 1) crucial to get right, and 2) impossible to answer.

The goal is to flatten out the GRASS learning curve, so that GRASS
proponents don't have to apologize for GRASS's usability problems. At
the 2003 OSCON in San Diego, there was an "Open Source GIS" session
featuring all the cool things that you can do with GRASS. Just about
the first thing out of the presenter's mouth was "Yeah, GRASS is hard
to use, but ...." We've got to stop that by making the GRASS learning
curve less steep.

--
--My blog is at angry-economist.russnelson.com | Don't like poverty?
Crynwr sells support for free software | PGPok |
521 Pleasant Valley Rd. | +1 315-323-1241 cell | Try economic freedom!
Potsdam, NY 13676-3213 | +1 212-202-2318 VOIP |

Russell Nelson said:

Mark P. Line writes:
> has more than one input map? Wouldn't this ultimately lead to a great
deal
> of entropy in the user's database with potentially many different
unnamed
> regions being propagated onto output files, as it were?

I would like people to be able to load data, and have GRASS discern
the correct region for that data.

Yes. And since you were offering to code such an enhancement, you would be
the one who determined how GRASS discerns the correct region for any
possible data. :slight_smile:

Hence my question. How are you proposing that a single "correct region"
for an input map, or set of input maps, should be determined?

I expect that sophisticated users will continue to find value in setting
a default region other than the one that GRASS has discerned. Naive
users will be rewarded with success, sophisticated users will not be
impeded. Everybody happy!

My belief is that naked GRASS is not and never has been a tool for naive
users. If there is demand for a point-and-click desktop GIS with GRASS as
the backend, and the current GUI branches are considered dead-ends, then I
bet there'd be enough people around to design and build it.

> Setting a region at start-up has the advantage of helping to keep all
> useful regions organized and named.

It has the disadvantage of presenting the naive user with a question
which is 1) crucial to get right, and 2) impossible to answer.

In what way is <g.region -d> not always a possible answer? What am I
missing? (This is not a rhetorical question: I was out of the GRASS
business for quite a while, and what worked then might not work now. We
all have our learning curves.)

The goal is to flatten out the GRASS learning curve, so that GRASS
proponents don't have to apologize for GRASS's usability problems. At
the 2003 OSCON in San Diego, there was an "Open Source GIS" session
featuring all the cool things that you can do with GRASS. Just about
the first thing out of the presenter's mouth was "Yeah, GRASS is hard
to use, but ...." We've got to stop that by making the GRASS learning
curve less steep.

Absolutely. What GRASS has always needed is an integrated, well-designed
and portable GUI front-end from whole cloth (read: without necessarily
duplicating the legacy user interface architecture and metaphors of
command-line GRASS) that allows command-line GRASS to disappear completely
from the user's view into its proper role as a back-end. I'm seeing some
approaches to that in the works as we speak (although I haven't looked at
them closely enough to have an opinion about them), and I think that's
where usability concerns should be addressed.

Trying to improve the enduser friendliness of naked GRASS -- especially
with a view towards letting naive users loose on the naked system -- would
be a bottomless time sink, in my view. I would no more pursue that than I
would pursue enduser friendliness improvements to autoconf.

-- Mark

Mark P. Line
Polymathix
San Antonio, TX

Russell Nelson wrote:

I believe that GRASS is made more difficult by the requirement to set
the working region at start-up time. I propose that the initial
region should be "none". Every program that uses the region should
see that there is no region, and generate one that covers all the
available data.

The term "every program that uses the region" is almost equivalent to
"every program". You are talking about re-writing most of GRASS.

There's also the issue of programs being unable to determine default
values for either the boundaries or the resolution.

Programs which don't read any maps (e.g. r.mapcalc where the RHS
doesn't refer to any maps) cannot determine defaults for any of the
region parameters.

Programs which don't read any raster maps (e.g. v.to.rast) cannot
determine defaults for the resolution.

Programs which do read maps may still not be able to determine
defaults, as there may not be an obvious correlation between the
boundary and resolution of any input maps and suitable settings for
the output maps; e.g. r.proj.

We already had this discussion a while ago, and the conclusion was
that your proposal wasn't feasible. Nothing has changed since then.

--
Glynn Clements <glynn@gclements.plus.com>

there was talk a little while back about resetting the default region.
(currently you have to edit DEFAULT_WIND manually)

what about

g.region -d --o

or

g.region save=default --o

?

Hamish

Glynn Clements writes:
> Russell Nelson wrote:
>
> > I believe that GRASS is made more difficult by the requirement to set
> > the working region at start-up time. I propose that the initial
> > region should be "none". Every program that uses the region should
> > see that there is no region, and generate one that covers all the
> > available data.
>
> The term "every program that uses the region" is almost equivalent to
> "every program". You are talking about re-writing most of GRASS.

Okay. That doesn't scare me.

> Programs which don't read any maps (e.g. r.mapcalc where the RHS
> doesn't refer to any maps) cannot determine defaults for any of the
> region parameters.

Then it would say "Please specify a region or set the default region
using g.region" and exit.

> Programs which don't read any raster maps (e.g. v.to.rast) cannot
> determine defaults for the resolution.

Then it would pick a reasonable one and report that it had done so.
Or if there's no reasonable way to choose one, it would say "Please
set the resolution of the region using g.region" and exit.

> Programs which do read maps may still not be able to determine
> defaults, as there may not be an obvious correlation between the
> boundary and resolution of any input maps and suitable settings for
> the output maps; e.g. r.proj.

There are probably more examples besides these. They can be dealt
with by causing them to emit useful messages.

> We already had this discussion a while ago, and the conclusion was
> that your proposal wasn't feasible. Nothing has changed since then.

GIS has become more important, but GRASS has not become any easier to
use. This is a problem, and it needs to be fixed.

--
--My blog is at angry-economist.russnelson.com | Don't like poverty?
Crynwr sells support for free software | PGPok |
521 Pleasant Valley Rd. | +1 315-323-1241 cell | Try economic freedom!
Potsdam, NY 13676-3213 | +1 212-202-2318 VOIP |

Mark P. Line writes:
> Hence my question. How are you proposing that a single "correct region"
> for an input map, or set of input maps, should be determined?

It's the bounding box which encloses the input map(s). That will
almost CERTAINLY be wrong. However, it gets the user to the point
where they will naturally go looking for a way to cut down the amount
of generated output ... in other words, set the region.

> > It has the disadvantage of presenting the naive user with a question
> > which is 1) crucial to get right, and 2) impossible to answer.
>
> In what way is <g.region -d> not always a possible answer?

By the time you get to that point, you've already been forced to
specify a region.

> Absolutely. What GRASS has always needed is an integrated, well-designed
> and portable GUI front-end from whole cloth (read: without necessarily
> duplicating the legacy user interface architecture and metaphors of
> command-line GRASS) that allows command-line GRASS to disappear completely
> from the user's view into its proper role as a back-end. I'm seeing some
> approaches to that in the works as we speak (although I haven't looked at
> them closely enough to have an opinion about them), and I think that's
> where usability concerns should be addressed.

In other words, give up on the existing GRASS user interface, and
instead treat GRASS as a toolset? Sign me up! Who is working on
this?? Point me to them, please!!

--
--My blog is at angry-economist.russnelson.com | Don't like poverty?
Crynwr sells support for free software | PGPok |
521 Pleasant Valley Rd. | +1 315-323-1241 cell | Try economic freedom!
Potsdam, NY 13676-3213 | +1 212-202-2318 VOIP |

From: "Hamish" <hamish_nospam@yahoo.com>

there was talk a little while back about resetting the default region.
(currently you have to edit DEFAULT_WIND manually)

what about

g.region -d --o

or

g.region save=default --o

?

Hamish

Sorry for interrupting, but what is that --o switch? I can't find it in g.region manual.

Maciek

On Sun, Jan 30, 2005 at 11:31:43PM -0500, Russell Nelson wrote:

Mark P. Line writes:
> Absolutely. What GRASS has always needed is an integrated, well-designed
> and portable GUI front-end from whole cloth (read: without necessarily
> duplicating the legacy user interface architecture and metaphors of
> command-line GRASS) that allows command-line GRASS to disappear completely
> from the user's view into its proper role as a back-end. I'm seeing some
> approaches to that in the works as we speak (although I haven't looked at
> them closely enough to have an opinion about them), and I think that's
> where usability concerns should be addressed.

In other words, give up on the existing GRASS user interface, and
instead treat GRASS as a toolset? Sign me up! Who is working on
this?? Point me to them, please!!

A first approach on your local machine might be:
rm -rf display/

... then the core functionality remains :slight_smile:

Remembering the "GRASS server" from Radim, we are not that far.
Contributions are always welcome.

Cheers

Markus

>> there was talk a little while back about resetting the default region.
>> (currently you have to edit DEFAULT_WIND manually)

> what about
> g.region -d --o
> or
> g.region save=default --o
> ?

Sorry for interrupting, but what is that --o switch? I can't find it in
g.region manual.

It tells GRASS that it is ok to overwrite existing maps.
It wasn't in any of the manuals because it is brand new.

you can set this to be assummed by setting the GRASS variable OVERWRITE:
g.gisenv set="OVERWRITE=1"

Hamish