3
<em>v.external</em> creates new vector map as a link to external OGR
4
layer or PostGIS feature table. OGR (Simple Features Library) is part
6
<a href="http://www.gdal.org">GDAL</a> library, so you need to install
7
GDAL to use <em>v.external</em> for external OGR layers. Note that a
8
PostGIS feature table can be linked also using built-in <em>GRASS-PostGIS
9
data driver</em> (requires GRASS to be built with PostgreSQL support).
11
<h3>Supported OGR vector formats</h3>
13
To list supported OGR formats, type
15
<div class="code"><pre>
20
<a href="http://www.gdal.org/ogr/ogr_formats.html">OGR web site</a>.
24
<h3>ESRI Shapefile</h3>
26
Assuming that 'test_shape.shp' is located in directory
27
'/home/user/shape_data'.
29
<div class="code"><pre>
30
v.external input=/home/user/shape_data layer=test_shape output=grass_map
33
<h3>MapInfo files</h3>
35
<div class="code"><pre>
36
v.external input=./ layer=mapinfo_test output=grass_map
41
Note: you have to select the CATD file
43
<div class="code"><pre>
44
v.external input=CITXCATD.DDF output=cities
49
<div class="code"><pre>
50
v.external input=input/2000/56015/ layer=CompleteChain,PIP output=t56015_all
53
<h3>PostGIS layers</h3>
55
PostGIS links are by default created by built-in PostGIS support,
56
ie. using <em>GRASS-PostGIS data driver</em>. If the environment
57
variable <tt>GRASS_VECTOR_OGR</tt> exists, or GRASS is compiled
58
without PostgreSQL support then GRASS will use OGR-PostgreSQL driver
61
<div class="code"><pre>
62
v.external input="PG:host=localhost user=postgres dbname=postgis" layer=polymap
67
The simple feature data model used by OGR (or PostGIS) is very
68
different from the topological format used by GRASS. Instead of true
69
topology, so called 'pseudo topology' is created for data linked by
70
<em>v.external</em>. User should learn the difference between those
71
two formats, because some modules working correctly with GRASS native
72
data, can produce wrong results with input vector maps created
73
by <em>v.external</em>.
75
<p>See <em><a href="v.db.connect.html">v.db.connect</a></em> for an example of
76
maintaining attributes in external DBMS in also writable mode.
80
<a href="http://www.gdal.org/ogr/ogr__api_8h.html">OGR vector library C API</a> documentation
85
<a href="v.external.out.html">v.external.out</a>,
86
<a href="v.clean.html">v.clean</a>,
87
<a href="v.db.connect.html">v.db.connect</a>,
88
<a href="v.in.db.html">v.in.db</a>,
89
<a href="v.in.ogr.html">v.in.ogr</a>,
90
<a href="v.out.ogr.html">v.out.ogr</a>
94
<a href="http://www.gdal.org/ogr/">OGR Library</a>
96
<a href="http://postgis.org/">PostGIS</a>
100
also GRASS <a href="http://grasswiki.osgeo.org/wiki/Working_with_external_data_in_GRASS_7">user wiki page</a> for more examples.
104
Radim Blazek, ITC-Irst, Trento, Italy
106
PostGIS support by Martin Landa, Czech Technical University in Prague, Czech Republic
109
<i>Last changed: $Date: 2014-11-26 18:33:23 +0100 (Wed, 26 Nov 2014) $</i>