Geography Reference
In-Depth Information
A Word About GRASS Commands
GRASS commands are arranged by function. For example, vec-
tor commands begin with
v.
, raster commands begin with
r.
,
database commands with
d.
, and general commands with
g.
.
For a complete list of these commands and their function, refer
to the online GRASS manual that is installed with GRASS. You
can easily access the manual using the
g.manual -i
command
from the GRASS shell.
This section will show you several ways to get some data into GRASS
so you can work with it, including the following:
• Import the data using
v.in.ogr
and
r.in.gdal
GRASS commands.
• Use the GRASS plugin in QGIS to import a loaded vector layer.
• Use
v.external
to make an external layer (for example a shapefile)
accessible to GRASS.
Using the Command Line
Let's start by importing some vector data into GRASS using
v.in.ogr
.
This command allows you to import data sources supported by the
on supported formats). This means we can use it to import a shapefile,
among others. The
world_borders
shape is stored in the
desktop_gis_data
folder (if you are following along, your location may vary). We will use it
to import into GRASS.
Let's look at part of the syntax help for
v.in.ogr
. If you want to get the
full picture, use
g.manual v.in.ogr
:
GRASS 6.2.2 (world_lat_lon):~ > v.in.ogr --help
Description:
Convert OGR vectors to GRASS. Available drivers:
ESRI Shapefile,MapInfo File,UK .NTF,SDTS,TIGER,S57,
DGN,VRT,AVCBin,REC,Memory,CSV,GML,PostgreSQL,GRASS
Usage:
v.in.ogr [-lfcztoe] dsn=string output=name [layer=string[,string,...]]
[spatial=value[,value,...]] [where=sql_query] [min_area=value]
[type=string[,string,...]] [snap=value] [location=string]
[cnames=string[,string,...]] [--overwrite]
Search WWH ::
Custom Search