In gis_set.tcl there is a check for a valid location which reads:
# All good locations have valid PERMANENT mapset.
if {[file exists "$dir/PERMANENT/WIND"] != 0} {
set found 1
Shouldn't this check for DEFAULT_WIND instead of WIND ?
I can see some sense in that. The only time that PERMANENT/WIND will
actually be used is if PERMANENT is used as the current mapset, which
may never happen. OTOH, PERMANENT/DEFAULT_WIND must exist in order to
create new mapsets.
> In gis_set.tcl there is a check for a valid location which reads:
>
> # All good locations have valid PERMANENT mapset.
> if {[file exists "$dir/PERMANENT/WIND"] != 0} {
> set found 1
>
> Shouldn't this check for DEFAULT_WIND instead of WIND ?
I can see some sense in that. The only time that PERMANENT/WIND will
actually be used is if PERMANENT is used as the current mapset, which
may never happen. OTOH, PERMANENT/DEFAULT_WIND must exist in order to
create new mapsets.
-----Original Message-----
From: grass-dev-bounces@lists.osgeo.org on behalf of Maris Nartiss
Sent: Fri 12/7/2007 7:44 AM
To: Glynn Clements
Cc: grass-dev
Subject: Re: [GRASS-dev] location invalid if PERMANENT contains no WIND file ?
Is this somewhere defined? I mean - where is the documentation about
valid location/mapset requirements?
> In gis_set.tcl there is a check for a valid location which reads:
>
> # All good locations have valid PERMANENT mapset.
> if {[file exists "$dir/PERMANENT/WIND"] != 0} {
> set found 1
>
> Shouldn't this check for DEFAULT_WIND instead of WIND ?
I can see some sense in that. The only time that PERMANENT/WIND will
actually be used is if PERMANENT is used as the current mapset, which
may never happen. OTOH, PERMANENT/DEFAULT_WIND must exist in order to
create new mapsets.
In gis_set.tcl there is a check for a valid location which reads:
# All good locations have valid PERMANENT mapset.
if {[file exists "$dir/PERMANENT/WIND"] != 0} {
set found 1
Shouldn't this check for DEFAULT_WIND instead of WIND ?
I can see some sense in that. The only time that PERMANENT/WIND will
actually be used is if PERMANENT is used as the current mapset, which
may never happen. OTOH, PERMANENT/DEFAULT_WIND must exist in order to
create new mapsets.
In this particular case, I could not enter the location via the GUI startup, but had no problem using it via the text startup.
There is the same kind of test for mapsets (lines 499ff and 650ff):
Again, should a missing WIND file be a reason to fail entering a mapset ? I think gis_set.tcl should just silently copy PERMANENT/DEFAULT_WIND to $mapset/WIND ?
I agree. There is a larger issue that I think may still be unsolved (though
Hamish's post makes me wonder now). In the past, if the .grassrc6 file
pointed to an incorrect GISDBASE, LOCATION, or MAPSET value (i.e., one that
did not exist), GRASS will automatically go into text mode and exit.
IMHO, it should simply bring up the startup screen for selecting the proper
GISDBASE, LOCATION, and MAPSET. But it never got to the GUI.
Michael
On 12/7/07 8:53 AM, "Moritz Lennert" <mlennert@club.worldonline.be> wrote:
On 07/12/07 10:42, Glynn Clements wrote:
Moritz Lennert wrote:
In gis_set.tcl there is a check for a valid location which reads:
# All good locations have valid PERMANENT mapset.
if {[file exists "$dir/PERMANENT/WIND"] != 0} {
set found 1
Shouldn't this check for DEFAULT_WIND instead of WIND ?
I can see some sense in that. The only time that PERMANENT/WIND will
actually be used is if PERMANENT is used as the current mapset, which
may never happen. OTOH, PERMANENT/DEFAULT_WIND must exist in order to
create new mapsets.
In this particular case, I could not enter the location via the GUI
startup, but had no problem using it via the text startup.
There is the same kind of test for mapsets (lines 499ff and 650ff):
Again, should a missing WIND file be a reason to fail entering a mapset
? I think gis_set.tcl should just silently copy PERMANENT/DEFAULT_WIND
to $mapset/WIND ?
Moritz
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
There is a larger issue that I think may still be unsolved (though
Hamish's post makes me wonder now). In the past, if the .grassrc6 file
pointed to an incorrect GISDBASE, LOCATION, or MAPSET value (i.e., one that
did not exist), GRASS will automatically go into text mode and exit.
IMHO, it should simply bring up the startup screen for selecting the proper
GISDBASE, LOCATION, and MAPSET. But it never got to the GUI.
For me this is exactly what I get with CVS head: an error message and when I click on ok I can chose the correct GISDBASE.
Michael Barton wrote:
> There is a larger issue that I think may still be unsolved (though
> Hamish's post makes me wonder now). In the past, if the .grassrc6 file
> pointed to an incorrect GISDBASE, LOCATION, or MAPSET value (i.e., one that
> did not exist), GRASS will automatically go into text mode and exit.
>
> IMHO, it should simply bring up the startup screen for selecting the proper
> GISDBASE, LOCATION, and MAPSET. But it never got to the GUI.
Moritz Lennert wrote:
For me this is exactly what I get with CVS head: an error message and
when I click on ok I can chose the correct GISDBASE.
I was referring to starting GRASS directly from the command line with the path
to the mapset, not from the GUI.
Hamish
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
I understand, but thought that the section where this is checked in init.sh
was still broken with regard to crashing on startup with incorrect or empty
GISDBASE, LOCATION, or MAPSET. If that part is already fixed, we only need
to fix the particular item you ran into.
Michael
On 12/7/07 4:24 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:
Michael Barton wrote:
There is a larger issue that I think may still be unsolved (though
Hamish's post makes me wonder now). In the past, if the .grassrc6 file
pointed to an incorrect GISDBASE, LOCATION, or MAPSET value (i.e., one that
did not exist), GRASS will automatically go into text mode and exit.
IMHO, it should simply bring up the startup screen for selecting the proper
GISDBASE, LOCATION, and MAPSET. But it never got to the GUI.
Moritz Lennert wrote:
For me this is exactly what I get with CVS head: an error message and
when I click on ok I can chose the correct GISDBASE.
I was referring to starting GRASS directly from the command line with the path
to the mapset, not from the GUI.
Hamish
______________________________________________________________________________
______
Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
>> In gis_set.tcl there is a check for a valid location which reads:
>>
>> # All good locations have valid PERMANENT mapset.
>> if {[file exists "$dir/PERMANENT/WIND"] != 0} {
>> set found 1
>>
>> Shouldn't this check for DEFAULT_WIND instead of WIND ?
>
> I can see some sense in that. The only time that PERMANENT/WIND will
> actually be used is if PERMANENT is used as the current mapset, which
> may never happen. OTOH, PERMANENT/DEFAULT_WIND must exist in order to
> create new mapsets.
>
In this particular case, I could not enter the location via the GUI
startup, but had no problem using it via the text startup.
There is the same kind of test for mapsets (lines 499ff and 650ff):
Again, should a missing WIND file be a reason to fail entering a mapset
? I think gis_set.tcl should just silently copy PERMANENT/DEFAULT_WIND
to $mapset/WIND ?
AFAIK, the idea is to prevent the user from selecting some random
subdirectory of the location as the current mapset. This allows the
location directory to have subdirectories which aren't mapsets and
which won't be mistaken for mapsets.
The convention is that $dir is a valid location if $dir/PERMANENT/WIND
exists, and that $dir is a valid mapset if $dir/WIND exists.
The former could reasonably be changed to look for
$dir/PERMANENT/DEFAULT_WIND instead of $dir/PERMANENT/WIND. I don't
think that the latter should be changed.