[GRASS-user] How to create a location and mapset programatically? (Using scritp). And then import MapInfo a vector map.

Glynn Clements glynn at gclements.plus.com
Fri Jul 18 01:36:29 EDT 2008


Nithi, Nachi K \(Karun\) wrote:

> I have two questions:
> 
> Q1. I want to create a location and a mapset via a shell script. I can
> create it by invoking grass in a text mode (or gui interface mode) and
> then stepping through several screeens (location , mapset input in the
> 1st screen, projection in the next screen, bounding box for the region
> in the 3rd screen and so on). I am wondering whether it is possible to
> do all in a script by invoking a set of commands. If so what should be
> the sequence of commands.

Use g.proj or g.mapset with the -c flag (note that the version of
g.mapset in 6.2.x doesn't have the -c flag; that requires 6.3.0).

If you want to do this from outside of GRASS, you can start GRASS
non-interactively by running the grass62 script with the full path to
an existing mapset directory as an argument.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list