[GRASS-SVN] r63154 - in grass/trunk: db/drivers/postgres scripts/db.in.ogr scripts/db.out.ogr scripts/v.db.update vector/v.external vector/v.external.out vector/v.in.ogr vector/v.info vector/v.out.ogr vector/v.out.postgis

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 26 09:28:46 PST 2014


Author: neteler
Date: 2014-11-26 09:28:45 -0800 (Wed, 26 Nov 2014)
New Revision: 63154

Modified:
   grass/trunk/db/drivers/postgres/grass-pg.html
   grass/trunk/scripts/db.in.ogr/db.in.ogr.html
   grass/trunk/scripts/db.in.ogr/db.in.ogr.py
   grass/trunk/scripts/db.out.ogr/db.out.ogr.py
   grass/trunk/scripts/v.db.update/v.db.update.py
   grass/trunk/vector/v.external.out/args.c
   grass/trunk/vector/v.external.out/v.external.out.html
   grass/trunk/vector/v.external/v.external.html
   grass/trunk/vector/v.in.ogr/main.c
   grass/trunk/vector/v.in.ogr/v.in.ogr.html
   grass/trunk/vector/v.info/v.info.html
   grass/trunk/vector/v.out.ogr/v.out.ogr.html
   grass/trunk/vector/v.out.postgis/v.out.postgis.html
Log:
dsn -> input/output/directory, use standardized options (#2409)

Modified: grass/trunk/db/drivers/postgres/grass-pg.html
===================================================================
--- grass/trunk/db/drivers/postgres/grass-pg.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/db/drivers/postgres/grass-pg.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -90,7 +90,7 @@
 GRASS can import this PostGIS polygon map as follows:
 
 <div class="code"><pre>
-v.in.ogr dsn="PG:host=localhost dbname=postgis user=neteler" layer=test \
+v.in.ogr input="PG:host=localhost dbname=postgis user=neteler" layer=test \
          output=test type=boundary,centroid
 v.db.select test
 v.info -t test

Modified: grass/trunk/scripts/db.in.ogr/db.in.ogr.html
===================================================================
--- grass/trunk/scripts/db.in.ogr/db.in.ogr.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/scripts/db.in.ogr/db.in.ogr.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -15,7 +15,7 @@
 
 <div class="code"><pre>
 # NOTE: create koeppen_gridcode.csvt first for type recognition
-db.in.ogr dsn=koeppen_gridcode.csv output=koeppen_gridcode
+db.in.ogr input=koeppen_gridcode.csv output=koeppen_gridcode
 db.select koeppen_gridcode
 </pre></div>
 
@@ -25,14 +25,14 @@
 for <em><a href="v.in.db.html">v.in.db</a></em>).
 
 <div class="code"><pre>
-db.in.ogr dsn=/path/to/mydata.dbf output=census_raleigh key=myid
+db.in.ogr input=/path/to/mydata.dbf output=census_raleigh key=myid
 db.describe -c census_raleigh
 </pre></div>
 
 <h3>Import of a SQLite table</h3>
 
 <div class="code"><pre>
-db.in.ogr dsn=/path/to/sqlite.db db_table=census_raleigh output=census_raleigh
+db.in.ogr input=/path/to/sqlite.db db_table=census_raleigh output=census_raleigh
 </pre></div>
 
 <h3>Import of a PostgreSQL table</h3>
@@ -40,7 +40,7 @@
 # HINT: if the database contains spatial tables, but you want to import a non-spatial 
 table, set the environmental variable PG_LIST_ALL_TABLES to YES before importing
 
-db.in.ogr dsn="PG:host=localhost dbname=ecad user=neteler" \
+db.in.ogr input="PG:host=localhost dbname=ecad user=neteler" \
           db_table=ecad_verona_tmean output=ecad_verona_tmean
 db.select ecad_verona_tmean
 db.describe -c ecad_verona_tmean
@@ -54,7 +54,7 @@
 
 <div class="code"><pre>
 export OGR_XLS_HEADERS='FORCE'
-db.in.ogr dsn=address.xls db_table=address_data
+db.in.ogr input=address.xls db_table=address_data
 </pre></div>
 
 <h2>SEE ALSO</h2>

Modified: grass/trunk/scripts/db.in.ogr/db.in.ogr.py
===================================================================
--- grass/trunk/scripts/db.in.ogr/db.in.ogr.py	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/scripts/db.in.ogr/db.in.ogr.py	2014-11-26 17:28:45 UTC (rev 63154)
@@ -21,7 +21,7 @@
 #%End
 
 #%option G_OPT_F_INPUT
-#% key: dsn
+#% key: input
 #% gisprompt: old,bin,file
 #% description: Table file to be imported or DB connection string
 #% required : yes
@@ -56,7 +56,7 @@
 
 
 def main():
-    dsn = options['dsn']
+    input = options['input']
     db_table = options['db_table']
     output = options['output']
     key = options['key']
@@ -65,8 +65,6 @@
 
     if db_table:
 	input = db_table
-    else:
-	input = dsn
 
     if not output:
 	tmpname = input.replace('.', '_')
@@ -87,7 +85,7 @@
 	layer = None
 
     try:
-        grass.run_command('v.in.ogr', flags='o', dsn=dsn, output=output,
+        grass.run_command('v.in.ogr', flags='o', input=input, output=output,
                           layer=layer, quiet=True)
     except CalledModuleError:
         if db_table:

Modified: grass/trunk/scripts/db.out.ogr/db.out.ogr.py
===================================================================
--- grass/trunk/scripts/db.out.ogr/db.out.ogr.py	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/scripts/db.out.ogr/db.out.ogr.py	2014-11-26 17:28:45 UTC (rev 63154)
@@ -26,7 +26,7 @@
 #%end
 
 #%option G_OPT_F_OUTPUT
-#% key: dsn
+#% key: output
 #% description: Table file to be exported or DB connection string
 #% required : yes
 #%end
@@ -63,14 +63,14 @@
     input = options['input']
     layer = options['layer']
     format = options['format']
-    dsn = options['dsn']
+    output = options['output']
     table = options['table']
 
     if format.lower() == 'dbf':
 	format = "ESRI_Shapefile"
 
     if format.lower() == 'csv':
-	olayer = basename(dsn, 'csv')
+	olayer = basename(output, 'csv')
     else:
 	olayer = None
 
@@ -82,7 +82,7 @@
     if olayer:
         try:
             grass.run_command('v.out.ogr', quiet=True, input=input, layer=layer,
-                              dsn=dsn,
+                              output=output,
                               format=format, type='point,line,area',
                               olayer=olayer)
         except CalledModuleError:
@@ -91,24 +91,24 @@
     else:
         try:
             grass.run_command('v.out.ogr', quiet=True, input=input,
-                              layer=layer, dsn=dsn,
+                              layer=layer, output=output,
                               format=format, type='point,line,area')
         except CalledModuleError:
             grass.fatal(_("Module <%s> failed") % 'v.out.ogr')
 
     if format == "ESRI_Shapefile":
 	exts = ['shp', 'shx', 'prj']
-	if dsn.endswith('.dbf'):
-	    outname = basename(dsn, 'dbf')
+	if output.endswith('.dbf'):
+	    outname = basename(output, 'dbf')
 	    for ext in exts:
 		try_remove("%s.%s" % (outname, ext))
 	    outname += '.dbf'
 	else:
 	    for ext in exts:
-		try_remove(os.path.join(dsn, "%s.%s" % (input, ext)))
-	    outname = os.path.join(dsn, input + ".dbf")
+		try_remove(os.path.join(output, "%s.%s" % (input, ext)))
+	    outname = os.path.join(output, input + ".dbf")
     elif format.lower() == 'csv':
-	outname = dsn + '.csv'
+	outname = output + '.csv'
     else:
 	outname = input
 

Modified: grass/trunk/scripts/v.db.update/v.db.update.py
===================================================================
--- grass/trunk/scripts/v.db.update/v.db.update.py	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/scripts/v.db.update/v.db.update.py	2014-11-26 17:28:45 UTC (rev 63154)
@@ -7,7 +7,7 @@
 #               Extensions by Markus Neteler
 #               Converted to Python by Glynn Clements
 # PURPOSE:      Interface to db.execute to update a column in the attribute table connected to a given map
-# COPYRIGHT:    (C) 2005,2007-2008,2011 by the GRASS Development Team
+# COPYRIGHT:    (C) 2005-2014 by the GRASS Development Team
 #
 #               This program is free software under the GNU General Public
 #               License (>=v2). Read the file COPYING that comes with GRASS
@@ -43,6 +43,10 @@
 #%end
 #%option G_OPT_DB_WHERE
 #%end
+#%option G_OPT_F_INPUT
+#% key: sqliteextra
+#% description: Name of libsqlitefunctions file for extra functions (SQLite backend only)
+#%end
 
 import sys
 import os
@@ -55,6 +59,7 @@
     value = options['value']
     qcolumn = options['qcolumn']
     where = options['where']
+    sqlitefile  = options['sqliteextra']
 
     mapset = grass.gisenv()['MAPSET']
 
@@ -71,6 +76,13 @@
     database = f['database']
     driver = f['driver']
 
+    # check for SQLite backend for extra functions
+    if sqlitefile and driver != "sqlite":
+        grass.fatal(_("Use of libsqlitefunctions only with SQLite backend"))
+    if driver == "sqlite" and sqlitefile:
+        if not os.access(sqlitefile, os.R_OK):
+            grass.fatal(_("File <%s> not found") % sqlitefile)
+
     # checking column types
     try:
         coltype = grass.vector_columns(vector, layer)[column]['type']
@@ -93,8 +105,12 @@
     if where:
         cmd += " WHERE " + where
 
+    # SQLite: allow for extra functions if provided by user
+    if sqlitefile:
+        sqliteload = "SELECT load_extension('%s');\n" % sqlitefile
+        cmd = sqliteload + cmd + ";\n"
+
     grass.verbose("SQL: \"%s\"" % cmd)
-
     grass.write_command('db.execute', input = '-', database = database, driver = driver, stdin = cmd)
 
     # write cmd history:

Modified: grass/trunk/vector/v.external/v.external.html
===================================================================
--- grass/trunk/vector/v.external/v.external.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.external/v.external.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -27,13 +27,13 @@
 '/home/user/shape_data'.
 
 <div class="code"><pre>
-v.external dsn=/home/user/shape_data layer=test_shape output=grass_map 
+v.external input=/home/user/shape_data layer=test_shape output=grass_map 
 </pre></div>
 
 <h3>MapInfo files</h3>
 
 <div class="code"><pre>
-v.external dsn=./ layer=mapinfo_test output=grass_map
+v.external input=./ layer=mapinfo_test output=grass_map
 </pre></div>
 
 <h3>SDTS files</h3>
@@ -41,13 +41,13 @@
 Note: you have to select the CATD file
 
 <div class="code"><pre>
-v.external dsn=CITXCATD.DDF output=cities
+v.external input=CITXCATD.DDF output=cities
 </pre></div>
 
 <h3>TIGER files</h3>
 
 <div class="code"><pre>
-v.external dsn=input/2000/56015/ layer=CompleteChain,PIP output=t56015_all
+v.external input=input/2000/56015/ layer=CompleteChain,PIP output=t56015_all
 </pre></div>
 
 <h3>PostGIS layers</h3>
@@ -59,7 +59,7 @@
 for creating a link.
 
 <div class="code"><pre>
-v.external dsn="PG:host=localhost user=postgres dbname=postgis" layer=polymap
+v.external input="PG:host=localhost user=postgres dbname=postgis" layer=polymap
 </pre></div>
 
 <h2>NOTES</h2>

Modified: grass/trunk/vector/v.external.out/args.c
===================================================================
--- grass/trunk/vector/v.external.out/args.c	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.external.out/args.c	2014-11-26 17:28:45 UTC (rev 63154)
@@ -9,9 +9,9 @@
 		struct _options *options, struct _flags *flags)
 {
     options->dsn = G_define_option();
-    options->dsn->key = "input";
+    options->dsn->key = "directory";
     options->dsn->type = TYPE_STRING;
-    options->dsn->label = _("Name of input OGR or PostGIS data source");
+    options->dsn->label = _("Name of output directory or OGR or PostGIS data source");
     options->dsn->description = _("Examples:\n"
 				  "\t\tESRI Shapefile: directory containing a shapefile\n"
 				  "\t\tMapInfo File: directory containing a mapinfo file\n"

Modified: grass/trunk/vector/v.external.out/v.external.out.html
===================================================================
--- grass/trunk/vector/v.external.out/v.external.out.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.external.out/v.external.out.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -89,10 +89,10 @@
 
 <div class="code"><pre>
 # register Shapefile in GRASS mapset:
-v.external dsn=/path/to/shapefiles layer=cities
+v.external input=/path/to/shapefiles layer=cities
 
 # define output directory for GRASS calculation results:
-v.external.out dsn=$HOME/gisoutput
+v.external.out output=$HOME/gisoutput
 
 # do something (here: spatial query), write output directly as Shapefile
 v.select ainput=cities atype=point binput=forests btype=area operator=within output=fcities
@@ -103,7 +103,7 @@
 <div class="code"><pre>
 v.external.out -p
 
-dsn: /path/to/home/gisoutput
+output: /path/to/home/gisoutput
 format: ESRI Shapefile
 </pre></div>
 
@@ -114,10 +114,10 @@
 
 <div class="code"><pre>
 # register PostGIS table in GRASS mapset:
-v.external dsn=PG:dbname=gisdb layer=cities
+v.external output=PG:dbname=gisdb layer=cities
 
 # define output PostGIS database for GRASS calculation results stored as simple features:
-v.external.out dsn=PG:dbname=gisdb format=PostgreSQL
+v.external.out output=PG:dbname=gisdb format=PostgreSQL
 
 # do some processing...
 </pre></div>
@@ -131,7 +131,7 @@
 
 <div class="code"><pre>
 # define output PostGIS database for GRASS calculation results stored as topological elements:
-v.external.out dsn=PG:dbname=gisdb format=PostgreSQL options=topology=YES
+v.external.out output=PG:dbname=gisdb format=PostgreSQL options=topology=YES
 
 # do some processing...
 </pre></div>
@@ -153,7 +153,7 @@
 
 <div class="code"><pre>
 # define output PostGIS database for GRASS calculation results stored as topological elements:
-v.external.out dsn=PG:dbname=gisdb format=PostgreSQL options=topology=YES output=gisdb_topo.txt
+v.external.out output=PG:dbname=gisdb format=PostgreSQL options=topology=YES output=gisdb_topo.txt
 
 # do some processing in PostGIS Topology
 </pre></div>
@@ -169,7 +169,7 @@
 Restore previous settings from "gisdb_topo.txt" file by specifying <b>input</b> option.
 
 <div class="code"><pre>
-v.external.out input=gisdb_topo.txt
+v.external.out output=gisdb_topo.txt
 
 # do some processing in PostGIS Topology
 </pre></div>

Modified: grass/trunk/vector/v.in.ogr/main.c
===================================================================
--- grass/trunk/vector/v.in.ogr/main.c	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.in.ogr/main.c	2014-11-26 17:28:45 UTC (rev 63154)
@@ -136,7 +136,7 @@
     module->description = _("Imports vector data into a GRASS vector map using OGR library.");
 
     param.dsn = G_define_option();
-    param.dsn->key = "dsn";
+    param.dsn->key = "input";
     param.dsn->type = TYPE_STRING;
     param.dsn->required =YES;
     param.dsn->label = _("OGR datasource name");

Modified: grass/trunk/vector/v.in.ogr/v.in.ogr.html
===================================================================
--- grass/trunk/vector/v.in.ogr/v.in.ogr.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.in.ogr/v.in.ogr.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -156,13 +156,13 @@
 <h3>SHAPE files</h3>
 
 <div class="code"><pre>
-v.in.ogr dsn=/home/user/shape_data/test_shape.shp output=grass_map 
+v.in.ogr input=/home/user/shape_data/test_shape.shp output=grass_map 
 </pre></div>
 
 Alternate method:
 
 <div class="code"><pre>
-v.in.ogr dsn=/home/user/shape_data layer=test_shape output=grass_map 
+v.in.ogr input=/home/user/shape_data layer=test_shape output=grass_map 
 </pre></div>
 
 Define encoding value for attribute data (in this example we expect
@@ -172,13 +172,13 @@
 use Latin script, Microsoft Windows encoding).
 
 <div class="code"><pre>
-v.in.ogr dsn=/home/user/shape_data/test_shape.shp output=grass_map encoding=cp1250
+v.in.ogr input=/home/user/shape_data/test_shape.shp output=grass_map encoding=cp1250
 </pre></div>
 
 <h3>MapInfo files</h3>
 
 <div class="code"><pre>
-v.in.ogr dsn=./ layer=mapinfo_test output=grass_map
+v.in.ogr input=./ layer=mapinfo_test output=grass_map
 </pre></div>
 
 <h3>Arc Coverage</h3>
@@ -187,7 +187,7 @@
 areas.
 
 <div class="code"><pre>
-v.in.ogr dsn=gemeinden layer=LAB,ARC type=centroid,boundary output=mymap
+v.in.ogr input=gemeinden layer=LAB,ARC type=centroid,boundary output=mymap
 </pre></div>
 
 <h3>E00 file</h3>
@@ -203,7 +203,7 @@
 
 <div class="code"><pre>
 avcimport e00file coverage
-v.in.ogr dsn=coverage layer=LAB,ARC type=centroid,boundary output=mymap
+v.in.ogr input=coverage layer=LAB,ARC type=centroid,boundary output=mymap
 </pre></div>
 
 <h3>SDTS files</h3> 
@@ -211,13 +211,13 @@
 You have to select the CATD file.
 
 <div class="code"><pre>
-v.in.ogr dsn=CITXCATD.DDF output=cities
+v.in.ogr input=CITXCATD.DDF output=cities
 </pre></div>
 
 <h3>TIGER files</h3>
 
 <div class="code"><pre>
-v.in.ogr dsn=input/2000/56015/ layer=CompleteChain,PIP output=t56015_all \
+v.in.ogr input=input/2000/56015/ layer=CompleteChain,PIP output=t56015_all \
 type=boundary,centroid snap=-1
 </pre></div>
 
@@ -226,13 +226,13 @@
 Import polygons as areas:
 
 <div class="code"><pre>
-v.in.ogr dsn="PG:host=localhost dbname=postgis user=postgres" layer=polymap \
+v.in.ogr input="PG:host=localhost dbname=postgis user=postgres" layer=polymap \
 output=polygons type=boundary,centroid
 </pre></div>
 
 <h3>Default connection settings as datasource (PostgreSQL only)</h3>
 
-If datasource (<b>dsn</b>) is specified as 'PG:' and the default DB
+If datasource (<b>input</b>) is specified as 'PG:' and the default DB
 driver is <a href="grass-pg.html">PostgreSQL</a> (<tt>pg</tt>) than
 the connection string is determined from the default DB settings, see
 examples below.
@@ -250,8 +250,8 @@
 <div class="code"><pre>
 db.connect driver=pg database=test schema=user1
 db.login user=user1 password=pwd1
-# -> dsn="PG:dbname=test user=user1 password=pwd1" layer="user1.river"
-v.in.ogr dsn=PG: layer=river output=river     
+# -> input="PG:dbname=test user=user1 password=pwd1" layer="user1.river"
+v.in.ogr input=PG: layer=river output=river     
 db.select table=user1.river
 </pre></div>
 
@@ -261,8 +261,8 @@
 <div class="code"><pre>
 db.connect driver=pg database=test
 db.login user=user1 password=pwd1
-# -> dsn="PG:dbname=test user=user1 password=pwd1"
-v.in.ogr dsn=PG: layer=river output=river 
+# -> input="PG:dbname=test user=user1 password=pwd1"
+v.in.ogr input=PG: layer=river output=river 
 db.select table=river
 </pre></div>
 
@@ -272,7 +272,7 @@
 ORACLE_SID, ORACLE_HOME</tt> and <tt>TNS_ADMIN</tt> accordingly.
 
 <div class="code"><pre>
-v.in.ogr dsn=OCI:username/password at database_instance output=grasslayer layer=roads_oci
+v.in.ogr input=OCI:username/password at database_instance output=grasslayer layer=roads_oci
 </pre></div>
 
 <h2>WARNINGS</h2>

Modified: grass/trunk/vector/v.info/v.info.html
===================================================================
--- grass/trunk/vector/v.info/v.info.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.info/v.info.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -51,7 +51,7 @@
 <div class="code"><pre>
 v.info -h map=geology
 
-COMMAND: v.in.ogr dsn="geol.shp" output="geology" min_area=0.0001 snap=-1
+COMMAND: v.in.ogr input="geol.shp" output="geology" min_area=0.0001 snap=-1
 GISDBASE: /bigdata/grassdata05
 LOCATION: ncfromfile MAPSET: PERMANENT USER: helena DATE: Mon Nov  6 15:48:53 2006
 ---------------------------------------------------------------------------------

Modified: grass/trunk/vector/v.out.ogr/v.out.ogr.html
===================================================================
--- grass/trunk/vector/v.out.ogr/v.out.ogr.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.out.ogr/v.out.ogr.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -61,7 +61,7 @@
 Export lines from GRASS vector map to Shapefile format:
 
 <div class="code"><pre>
-v.out.ogr input=lines type=line dsn=lines.shp
+v.out.ogr input=lines type=line output=lines.shp
 </pre></div>
 
 <p>
@@ -69,34 +69,34 @@
 islands (holes) to filled polygons:
 
 <div class="code"><pre>
-v.out.ogr -c input=areas_islands type=area dsn=areas_islands.shp
+v.out.ogr -c input=areas_islands type=area output=areas_islands.shp
 </pre></div>
 
 <p>
 Export 3D lines from GRASS vector map to Shapefile format:
 
 <div class="code"><pre>
-v.out.ogr input=lines_3d type=line dsn=lines_3d.shp lco="SHPT=ARCZ"
+v.out.ogr input=lines_3d type=line output=lines_3d.shp lco="SHPT=ARCZ"
 </pre></div>
 
 <p>
 Export 3D points (e.g., Lidar points) from GRASS vector map to Shapefile format
 
 <div class="code"><pre>
-v.out.ogr points_3d type=point dsn=points_3d.shp lco="SHPT=POINTZ"
+v.out.ogr points_3d type=point output=points_3d.shp lco="SHPT=POINTZ"
 </pre></div>
 
 <p>
 Export 3D faces from GRASS vector map to Shapefile format:
 <div class="code"><pre>
-v.out.ogr input=objects_3d type=face dsn=faces_3d.shp lco="SHPT=POLYGONZ"
+v.out.ogr input=objects_3d type=face output=faces_3d.shp lco="SHPT=POLYGONZ"
 </pre></div>
 
 <p>
 Export 3D faces from GRASS vector map to Shapefile format, automatic 3D setting:
 
 <div class="code"><pre>
-v.out.ogr input=objects_3d type=face dsn=faces_3d.shp"
+v.out.ogr input=objects_3d type=face output=faces_3d.shp"
 </pre></div>
 
 <h3>Export to GML</h3>
@@ -105,7 +105,7 @@
  (generates '/tmp/testogr.gml' file with layer 'testogr'):
 
 <div class="code"><pre>
-v.out.ogr input=multi type=line dsn=/tmp/testogr.gml olayer=testogr format=GML 
+v.out.ogr input=multi type=line output=/tmp/testogr.gml olayer=testogr format=GML 
 </pre></div>
 
 <h3>Export to PostgreSQL/PostGIS</h3>
@@ -113,7 +113,7 @@
 Export areas from GRASS vector map to PostGIS database:
 
 <div class="code"><pre>
-v.out.ogr input=polygons type=area dsn="PG:host=localhost dbname=postgis user=postgres" olayer=polymap format=PostgreSQL
+v.out.ogr input=polygons type=area output="PG:host=localhost dbname=postgis user=postgres" olayer=polymap format=PostgreSQL
 </pre></div>
 
 <i>Note:</i> For exporting GRASS vector data to PostGIS database can
@@ -127,7 +127,7 @@
 Export faces (3D vectors) from GRASS vector map to KML format for Google Earth:
 
 <div class="code"><pre>
-v.out.ogr input=buildings_3d dsn=buildings_3d.kml olayer=buildings_3d format=KML type=face
+v.out.ogr input=buildings_3d output=buildings_3d.kml olayer=buildings_3d format=KML type=face
 </pre></div>
 
 <p>
@@ -149,7 +149,7 @@
 v.hull input=random3d output="random3d_hull"
 
 # export to KML 3D
-v.out.ogr input=random3d_hull dsn=random3d_hull.kml format=KML type=face dsco="AltitudeMode=absolute"
+v.out.ogr input=random3d_hull output=random3d_hull.kml format=KML type=face dsco="AltitudeMode=absolute"
 
 # now open KML file 'random3d_hull.kml' in Google Earth or NASA WorldWind or ...
 </pre></div>

Modified: grass/trunk/vector/v.out.postgis/v.out.postgis.html
===================================================================
--- grass/trunk/vector/v.out.postgis/v.out.postgis.html	2014-11-26 17:26:33 UTC (rev 63153)
+++ grass/trunk/vector/v.out.postgis/v.out.postgis.html	2014-11-26 17:28:45 UTC (rev 63154)
@@ -4,7 +4,7 @@
 PostGIS feature table. Features without category are skipped.
 
 <p>
-By default GRASS topological features are converted into simple
+By default GRASS GIS topological features are converted into simple
 features
 (see <a href="http://www.opengeospatial.org/standards/sfa">OGC Simple
 Feature Access</a> specification for details). Flag <b>-l</b> allows
@@ -129,7 +129,7 @@
 database schema is automatically used when not defined by the user.
 
 <div class="code"><pre>
-v.out.postgis input=urbanarea dsn="PG:dbname=grass"
+v.out.postgis input=urbanarea output="PG:dbname=grass"
 </pre></div>
 
 GRASS areas are converted into polygons, isles into holes. We can
@@ -147,7 +147,7 @@
 by <em><a href="v.out.ogr.html">v.out.ogr</a></em> module, eg.
 
 <div class="code"><pre>
-v.out.ogr input=urbanarea dsn="PG:dbname=grass" format=PostgreSQL
+v.out.ogr input=urbanarea output="PG:dbname=grass" format=PostgreSQL
 </pre></div>
 
 In this case GRASS vector data are exported to PostGIS database using
@@ -170,7 +170,7 @@
 schema "grassout".
 
 <div class="code"><pre>
-v.out.postgis input=bridges dsn="PG:dbname=grass" olayer=grassout.bridges
+v.out.postgis input=bridges output="PG:dbname=grass" olayer=grassout.bridges
 </pre></div>
 
 <h3>Export data with creation options</h3>
@@ -181,7 +181,7 @@
 3358 (North Carolina dataset).
 
 <div class="code"><pre>
-v.out.postgis input=roadsmajor dsn="PG:dbname=grass" options="GEOMETRY_NAME=wkb_geometry,SPATIAL_INDEX=NO,SRID=3358"
+v.out.postgis input=roadsmajor output="PG:dbname=grass" options="GEOMETRY_NAME=wkb_geometry,SPATIAL_INDEX=NO,SRID=3358"
 </pre></div>
 
 <h3>Link exported data</h3>
@@ -194,7 +194,7 @@
 as a link to the PostGIS feature table.
 
 <div class="code"><pre>
-v.out.postgis input=busstopsall at PERMANENT dsn="PG:dbname=grass" olink=busstopsall_pg
+v.out.postgis input=busstopsall at PERMANENT output="PG:dbname=grass" olink=busstopsall_pg
 </pre></div>
 
 Created link can be checked
@@ -225,7 +225,7 @@
 will contain only two columns, the fid and geometry column.
 
 <div class="code"><pre>
-v.out.postgis -t input=railroads dsn="PG:dbname=grass"
+v.out.postgis -t input=railroads output="PG:dbname=grass"
 </pre></div>
 
 <h3>Export topological data</h3>
@@ -237,7 +237,7 @@
 Topology</a> schema.
 
 <div class="code"><pre>
-v.out.postgis -l input=busroutesall dsn="PG:dbname=grass"
+v.out.postgis -l input=busroutesall output="PG:dbname=grass"
 </pre></div>
 
 For more info about PostGIS Topology implementation in GRASS see



More information about the grass-commit mailing list