[GRASS-SVN] r63340 - in grass/branches/releasebranch_7_0: . lib/python/temporal lib/raster3d scripts/db.out.ogr scripts/v.in.e00 scripts/v.in.gps scripts/v.in.wfs

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 2 14:12:33 PST 2014


Author: neteler
Date: 2014-12-02 14:12:33 -0800 (Tue, 02 Dec 2014)
New Revision: 63340

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py
   grass/branches/releasebranch_7_0/lib/raster3d/close.c
   grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.html
   grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.py
   grass/branches/releasebranch_7_0/scripts/v.in.e00/v.in.e00.py
   grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gps.py
   grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gpsbabel
   grass/branches/releasebranch_7_0/scripts/v.in.wfs/v.in.wfs.py
Log:
update keys to use new element names (#2409); db.out.ogr manual update (trunk, r63339)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:60817,61096,61141,61994,62105,62179-62180,62182,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750,62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62831,62838,62847,62850,62856,62879,62881,62886,62907-62908,62910,62912,62914,62916,62918,62920,62925,62933,62935,62940,62942,62944-62946,62949,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,63047,63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,63076,63079,63081,63083,63085,63087,63089,
 63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63276,63279,63281,63283,63287,63290,63292,63302,63315,63319,63330,63332
   + /grass/trunk:60817,61096,61141,61994,62105,62179-62180,62182,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750,62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62831,62838,62847,62850,62856,62879,62881,62886,62907-62908,62910,62912,62914,62916,62918,62920,62925,62933,62935,62940,62942,62944-62946,62949,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,63047,63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,63076,63079,63081,63083,63085,63087,63089,
 63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63276,63279,63281,63283,63287,63290,63292,63302,63315,63319,63330,63332,63339

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py	2014-12-02 22:12:33 UTC (rev 63340)
@@ -135,7 +135,7 @@
         filename = row["filename"] + ".xml"
 
         try:
-            gscript.run_command("v.in.ogr", dsn=filename,
+            gscript.run_command("v.in.ogr", input=filename,
                                 output=name, flags=impflags,
                                 overwrite=gscript.overwrite())
 

Modified: grass/branches/releasebranch_7_0/lib/raster3d/close.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/raster3d/close.c	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/lib/raster3d/close.c	2014-12-02 22:12:33 UTC (rev 63340)
@@ -38,7 +38,7 @@
     Rast3d_write_cats(map->fileName, &cats);
     Rast_free_cats(&cats);
 
-    /*genrate the history file, use the normal G_ functions */
+    /*generate the history file, use the normal G_ functions */
     Rast_short_history(map->fileName, "raster3d", &hist);
     Rast_command_history(&hist);
     /*Use the G3d function to write the history file,
@@ -59,7 +59,7 @@
     if (link(map->tempName, path) < 0) {
 #endif
 	if (rename(map->tempName, path)) {
-	    G_warning(_("Unable to move temp raster map <%s> to 3d data file <%s>"),
+	    G_warning(_("Unable to move temp raster map <%s> to 3D raster map <%s>"),
 		      map->tempName, path);
 	    return 0;
 	}

Modified: grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.html
===================================================================
--- grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.html	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.html	2014-12-02 22:12:33 UTC (rev 63340)
@@ -1,42 +1,55 @@
 <h2>DESCRIPTION</h2>
 
-<em>db.out.ogr</em> exports GRASS GIS attribute tables into various formats as
-supported by the OGR driver on the local system (CSV, DBF,
+<em>db.out.ogr</em> exports GRASS GIS attribute tables into various formats
+as supported by the OGR driver on the local system (CSV, DBF,
 PostgreSQL, SQLite, MySQL, ODBC, etc.).
 <p>
-The <em>dsn</em> parameter is commonly the output file name (if the path is not
-defined, too, the module will attempt write to the current directory). In case
-of a database connection as output, the connection string has to be specified.
+The <em>output</em> parameter is used to define the output file name (if
+the path is not defined, the module will attempt to write to the current
+directory). In case of a database connection as output, the connection
+string has to be specified.
 <p>
 The <em>layer</em> parameter is needed if the attribute table to be exported
 is linked as non-default layer to a vector map.
 
 <h2>EXAMPLES</h2>
 
-Export of GRASS table to a DBF table (default format):
-<p><div class="code"><pre>
-db.out.ogr precip_30ynormals dsn=/tmp/precip_30ynormals.dbf
+<h3>Export of GRASS GIS attribute table to a CSV table file (default format)</h3>
+
+<div class="code"><pre>
+db.out.ogr input=precip_30ynormals output=precip_30ynormals.csv
 </pre></div>
 
-<p>Export of GRASS table to a CSV table file:<br>
-<p><div class="code"><pre>
-db.out.ogr precip_30ynormals dsn=precip_30ynormals.csv format=CSV
+<h3>Export of a GRASS GIS attribute table to a DBF table</h3>
+
+<div class="code"><pre>
+db.out.ogr input=precip_30ynormals output=precip_30ynormals.dbf format=DBF
 </pre></div>
 
-<p>Export of GRASS table into a PostgreSQL table:
-<p><div class="code"><pre>
-db.out.ogr precip_30ynormals dsn="PG:host=localhost dbname=meteo user=neteler" \
+<h3>Export of GRASS GIS attribute table into a PostgreSQL table</h3>
+
+<div class="code"><pre>
+db.out.ogr input=precip_30ynormals \
+	   output="PG:host=localhost dbname=meteo user=neteler" \
            format=PostgreSQL
+# verify
 echo "SELECT * FROM precip_30ynormals" | psql meteo
 </pre></div>
 
 
 <h2>SEE ALSO</h2>
 
-<em><a href="sql.html">GRASS SQL interface</a></em>
+<em>
+<a href="db.tables.html">db.tables</a>
+</em>
+<p>
+<em>
+<a href="sql.html">GRASS SQL interface</a>
+</em>
 
-<h2>AUTHOR</h2>
+<h2>AUTHORS</h2>
 
-Markus Neteler
+Markus Neteler<br>
+Converted to Python by Glynn Clements
 
 <p><i>Last changed: $Date$</i>

Modified: grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.py	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/scripts/db.out.ogr/db.out.ogr.py	2014-12-02 22:12:33 UTC (rev 63340)
@@ -6,7 +6,7 @@
 # AUTHOR(S):   	Markus Neteler
 #               Converted to Python by Glynn Clements
 # PURPOSE:      exports attribute tables into various formats
-# COPYRIGHT:    (C) 2007 by Markus Neteler and the GRASS Development Team
+# COPYRIGHT:    (C) 2007-2014 by Markus Neteler and the GRASS Development Team
 #
 #               This program is free software under the GNU General Public
 #               License (>=v2). Read the file COPYING that comes with GRASS
@@ -18,16 +18,18 @@
 #% description: Exports attribute tables into various formats.
 #% keywords: database
 #% keywords: attribute table
+#% keywords: export
 #%end
 
 #%option G_OPT_V_INPUT
 #% key: input
+#% label: GRASS table name
 #% required: yes
 #%end
 
 #%option G_OPT_F_OUTPUT
 #% key: output
-#% description: Table file to be exported or DB connection string
+#% description: Output table file name or DB connection string
 #% required : yes
 #%end
 
@@ -48,7 +50,7 @@
 #% key: table
 #% type: string
 #% key_desc: name
-#% description: Name for output table (defaut: input)
+#% description: Name for output table (default: input name)
 #% required: no
 #%end
 

Modified: grass/branches/releasebranch_7_0/scripts/v.in.e00/v.in.e00.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.in.e00/v.in.e00.py	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/scripts/v.in.e00/v.in.e00.py	2014-12-02 22:12:33 UTC (rev 63340)
@@ -133,7 +133,7 @@
     itype = dict(point = 'point', line = 'line', area = 'centroid')
 
     try:
-        grass.run_command('v.in.ogr', flags='o', dsn=e00shortname,
+        grass.run_command('v.in.ogr', flags='o', input=e00shortname,
                           layer=layer[type], type=itype[type],
                           output=name)
     except CalledModuleError:

Modified: grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gps.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gps.py	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gps.py	2014-12-02 22:12:33 UTC (rev 63340)
@@ -171,7 +171,7 @@
 
     tmp_gpx = tmp + ".gpx"
     try:
-        grass.run_command('v.in.ogr', dsn=tmp_gpx, output=output,
+        grass.run_command('v.in.ogr', input=tmp_gpx, output=output,
                           type=type, format='GPX', lco=linetype,
                           dsco="GPX_USE_EXTENSIONS=YES", quiet=True)
     except CalledModuleError:

Modified: grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gpsbabel
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gpsbabel	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/scripts/v.in.gps/v.in.gpsbabel	2014-12-02 22:12:33 UTC (rev 63340)
@@ -388,7 +388,7 @@
 	    #   use '-c location=', then v.proj it in, then rm -rf the temp locn?
 	    #? GPX_USE_EXTENSIONS=YES
 	    #? export GPX_USE_EXTENSIONS
-	    #v.in.ogr dsn="$TEMPFILE.gpx" out=$map_name
+	    #v.in.ogr input="$TEMPFILE.gpx" output=$map_name
 	    echo
 	fi
 

Modified: grass/branches/releasebranch_7_0/scripts/v.in.wfs/v.in.wfs.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.in.wfs/v.in.wfs.py	2014-12-02 22:10:00 UTC (rev 63339)
+++ grass/branches/releasebranch_7_0/scripts/v.in.wfs/v.in.wfs.py	2014-12-02 22:12:33 UTC (rev 63340)
@@ -138,7 +138,7 @@
 
     grass.message(_("Importing data..."))
     try:
-        grass.run_command('v.in.ogr', flags='o', dsn=tmpxml, out=out)
+        grass.run_command('v.in.ogr', flags='o', input=tmpxml, output=out)
         grass.message(_("Vector points map <%s> imported from WFS.") % out)
     except:
         grass.message(_("WFS import failed"))



More information about the grass-commit mailing list