Create GRASS database by script

Michel Wurtz - ENGEES/CEREG mw at engees.u-strasbg.fr
Fri May 28 12:00:42 EDT 1999


Markus Neteler wrote:
> 
> Hi all,
> 
> I would like to create a new GRASS databse
> (with location definition etc.) by script.
> 
> Is there a way to do that?

It depends what you really need : creating a database consists
mainly by some mkdir commands followed by the creation of the
PERMANENT location with the (text) files WIND, DEFAULT_WIND, MYNAME,
and maybe PROJECTION.

It isn't difficult to write a shell script doing that (or a
Tcl/tk script if you like graphic interfaces, but you can give
attributes to a shell script, so it may be easier to batch
the creation of multiple locations)

Maybe something like that for a command line :

m.create.location Middle-earth.PERMANENT "Gis for Tolkien stories" \
xmin=345000 ymin=756000 xmax=350000 ymax=760000 xres=50 yres=50

-- 
Michel Wurtz    ENGEES - CEREG
                1, quai Koch - BP 1039, F-67070 STRASBOURG cedex
                Tel: +33 03.88.24.82.45  Fax: +33 03.88.37.04.97



More information about the grass-user mailing list