[GRASS-user] Re: grass-user Digest, Vol 33, Issue 40
Michael Barton
michael.barton at asu.edu
Mon Jan 19 13:29:15 EST 2009
On Jan 19, 2009, at 10:00 AM, <grass-user-request at lists.osgeo.org>
wrote:
> Date: Mon, 19 Jan 2009 17:37:07 +0100
> From: Moritz Lennert <mlennert at club.worldonline.be>
> Subject: Re: [GRASS-user] Original location: How to create from the
> command line ?
> To: Glynn Clements <glynn at gclements.plus.com>
> Cc: grass-user at lists.osgeo.org, Peter L?we <peter.loewe at gmx.de>
> Message-ID: <4974AC33.9080002 at club.worldonline.be>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 19/01/09 17:16, Glynn Clements wrote:
>> "Peter Löwe" wrote:
>>
>>>>> is there an (easy) recipe to create a completely new location from
>>>>> scratch without using a GUI ?
>>>>>
>>>>> To be precise: If GRASS is started for the first time in "-text"
>>>>> mode
>>>>> (=no GUI) ** without having a sample location like Spearfish or
>>>>> North
>>>>> Carolina around**, how can location parameters (projection,
>>>>> extent,
>>>>> EPSG...) be handed over to set up a very first location ?
>>>> Just type in the name of the location you want to create and
>>>> GRASS will
>>>> prompt you for the parameters.
>>
>>> That's true. But is there also a way to provide the parameters
>>> _without_ interaction with the user (-> GRASS scripting &
>>> automation)
>>
>> You can create a new location and mapset with "g.proj -c ...", then
>> make it current with g.mapset. But those are GRASS commands, and only
>> work within GRASS.
>
> I imagine that you can create your own location by having a script
> create the location directory, the PERMANENT mapset directory and the
> PROJ_INFO, DEFAULT_WIND and PROJ_UNITS files, or ?
>
> Moritz
AFAICT, you'll need to script this, since you can't run GRASS commands
to create a location until you've started GRASS in a location.
We are switching GRASS to primarily use Python for scripting (though
it will always be possible to use other languages). Check out the new
Python location wizard for code to create locations before starting
GRASS. ../gui/wxpythyon/gui_modules/location_wizard.py
Michael
More information about the grass-user
mailing list