Geography Reference
In-Depth Information
Flags:
-l
List available layers in data source and exit
-f
List available formats and exit
-c
Do not clean polygons (not recommended)
-z
Create 3D output
-t
Do not create attribute table
-o
Override projection (use location's projection)
-e
Extend location extents based on new dataset
--o
Force overwrite of output files
Parameters:
dsn
OGR datasource name. Examples:
ESRI Shapefile: directory containing shapefiles
MapInfo File: directory containing mapinfo files
output
Name for output vector map
layer
OGR layer name. If not given, all available layers are imported.
Examples:
ESRI Shapefile: shapefile name
MapInfo File: mapinfo file name
If you happen to invoke a GRASS command without any parameters,
a GUI window will pop up, allowing you to set the options and execute
the command. To import our layer, we'll use the command line rather
than the GUI.
There are a lot of optional flags and parameters we can use with v.in.ogr .
For our example, we are going to go the simple route and see whether
it gives us the expected results. To import the layer, use the following:
v.in.ogr dsn=/home/gsherman/desktop_gis_data output=world_borders \
layer=world_borders
The dsn is the data source name and, in the case of OGR vectors, refers
to the directory where the layers are stored. In this case, that's the
directory where the world_borders layer lives: /home/gsherman/desktop_
gis_data . If you don't specify a layer name using the layer parameter, all
layers in the dsn directory will be imported. This obviously can be pretty
handy for bringing in a lot of layers all at once.
Importing the layer will take a while. GRASS does a number of things
when importing a layer, including building topology as appropriate. Part
of the output from the import process is shown next. We didn't include
the entire output because it gets quite long and includes detailed infor-
mation about the import process and building topology.
 
Search WWH ::




Custom Search