[GRASS-dev] G.proj requirements?

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri Dec 15 05:44:32 EST 2006


Hello Michael
I *think* all it should need is a valid GISRC file, i.e. with the 3 fields 
GISDBASE, LOCATION_NAME and MAPSET. The latter two won't be relevant if no 
exising locations are there, so they can contain anything, but GISDBASE is 
important. Look at the code in Init.sh that creates a initial GISRC if 
none is there. So I think it should work if the file contains the 3 lines:
GISDBASE: C:/grassdata
LOCATION_NAME: <UNKNOWN>
MAPSET: <UNKNOWN>

You need to set the GISRC environment variable to point to the location of 
this file; also the GISBASE environment variable needs to point to the 
location of the GRASS installation. I think that should be all you need. 
Note that Init.sh will have created a GISRC file if none exists before 
starting gis_set.tcl (AFAICT) so you should have no trouble here at all 
and not actually need to worry about this. I think.

Just a note that you need to pay attention to what is done by Init.sh and 
what is done by etc/set_data (text) or gis_set.tcl (GUI) and the 
interaction between the two. E.g. where Mariss was talking about failure. 
Failure should be handled in Init.sh I think - the key thing is for 
gis_set.tcl to return a proper return value so Init.sh knows it has 
failed. Of course "recoverable failures" could be handled within 
gis_set.tcl and give the user another chance to create the location.

Paul

On Fri, 15 Dec 2006, Michael Barton wrote:

> Maris Nartiss noticed that if you are starting from scratch (i.e., you have
> no locations already defined), you can¹t create a new location from a
> georeferenced file. But you can create one from an EPSG code.
>
> I¹m working on the epsg startup and have found that Markus did a bash script
> that makes an epsg created location functional even when there is no prior
> location defined. This script creates a temporary location for use while
> g.proj is running, and then deletes it.
>
> I¹m wrapping this code into the new epsg_option.tcl script I've done (it now
> can search the EPSG file and automatically grab the code). I can do the same
> for the file_option.tcl script to make creating a new location from a
> georeferenced file equally functional.
>
> So here is what I need to know, if anyone has the answer. What does g.proj
> *REALLY* need in order to run?
>
> I'm beginning to think that it needs an existing .grassrc6 file with a
> GISDBASE path defined (and set as an environmental variable) so that it
> knows where to put a new location.
>
> Is this all? Or does it also need a GISDBASE path with at least one location
> already defined? Does it need a .grassrc6 file, or is setting the GISDBASE
> environmental variable good enough?
>
> This could really simplify the code for creating a new location.
>
> Thanks
> Michael
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>


More information about the grass-dev mailing list