[GRASS-dev] creating location from the command line

Michael Barton michael.barton at asu.edu
Sun Apr 6 12:36:12 EDT 2008




On 4/6/08 9:00 AM, "grass-dev-request at lists.osgeo.org"
<grass-dev-request at lists.osgeo.org> wrote:

> Message: 2
> Date: Sun, 06 Apr 2008 13:59:05 +0700
> From: Ivan Shmakov <ivan at theory.asu.ru>
> Subject: [GRASS-dev] creating location from the command line
> To: grass-dev at lists.osgeo.org
> Cc: Ivan Shmakov <oneingray at gmail.com>
> Message-ID: <m2od8nii4m.fsf_-_ at cherry.siamics.int>
> Content-Type: text/plain; charset=us-ascii
> 
>>>>>> Glynn Clements <glynn at gclements.plus.com> writes:
> 
> [...]
> 
>>> I tinkered with the grass.sh script in
>>> /Apps.../Grass-6.3.app/Contents/MacOS to bypass any of the GUI setup
>>> (X and Terminal windows) when GRASS_BATCH_JOB is non-empty.  That
>>> provided the behavior I was after and didn't interfere with
>>> interactive use, so setting and acting upon a switch to indicate
>>> background execution will work.
> 
>> GRASS_BATCH_JOB is a bit of a hack. You would be better off
>> bypassing Init.sh altogether.
> 
> I wonder, is there a way to create locations non-interactively?

You can do this with g.proj.

This is how it's done in the wxPython location wizard. If interested, check
out the code there.

Michael

> 
> It may be quite useful in, e. g., the test suite's scripts.
> I've in mind the following scheme:
> 
> * create a fresh location;
> 
> * prepare inputs and produce outputs;
> 
> * check checksums (SHA1 or MD5) of the files in the locations to
>  match those contained in the test suite; check for unwanted or
>  missing files as well;
> 
> * if all went good, remove the location; otherwise, leave it

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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