[GRASS-dev] Re: G.proj requirements?

Maris Nartiss maris.gis at gmail.com
Fri Dec 15 05:27:44 EST 2006


Hi Michael and others,

1st - g.proj, as most of other GRASS modules, calls G_gisinit() at
beginning. I traced down requirements to lib/gis/env.c, but at first
look could not understand how it works :)

2nd - as make_location_epsg.sh works, the easiest way would be just to
copy that file and modify for geroef file needs.
Two questions still remain - a) should georeferenced file be imported
into new location and b) how to do that, as most of r/v.in.* modules
have a lot of options making they use user-dependent (I mean -
importing shapefile is straight - one file, one layer and all, but
what to do with more complex file types)?

3 - if You Michael are working on EPSG/Georef scripts, I will then
look on startup screen. Only question - do You plan to include some
code to notify user about failed process? I plan to get rid of
requirement to restart GRASS to start using new location and I need to
know how are You dealing with failure. One option is - after running
"create loc from XX", at startup screen check if newLoc is valid and
then report an error to user, if it is NOT valid (an error while
creating new loc).

About simplifying code - maybe there is place under the sun for script
crate-temp-location.sh?

Maris.

PS. Damn' tcl/tk! It's so easy (and fun), that I hack around in GRASS
code instead of doing real work ;)

2006/12/15, Michael Barton <michael.barton at asu.edu>:
> 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
>
>
>




More information about the grass-dev mailing list