[GRASS-SVN] r63339 - in grass/trunk: 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:10:00 PST 2014
Author: neteler
Date: 2014-12-02 14:10:00 -0800 (Tue, 02 Dec 2014)
New Revision: 63339
Modified:
grass/trunk/lib/python/temporal/stds_import.py
grass/trunk/lib/raster3d/close.c
grass/trunk/scripts/db.out.ogr/db.out.ogr.html
grass/trunk/scripts/db.out.ogr/db.out.ogr.py
grass/trunk/scripts/v.in.e00/v.in.e00.py
grass/trunk/scripts/v.in.gps/v.in.gps.py
grass/trunk/scripts/v.in.gps/v.in.gpsbabel
grass/trunk/scripts/v.in.wfs/v.in.wfs.py
Log:
update keys to use new element names (#2409); db.out.ogr manual update
Modified: grass/trunk/lib/python/temporal/stds_import.py
===================================================================
--- grass/trunk/lib/python/temporal/stds_import.py 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/lib/python/temporal/stds_import.py 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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/trunk/lib/raster3d/close.c
===================================================================
--- grass/trunk/lib/raster3d/close.c 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/lib/raster3d/close.c 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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/trunk/scripts/db.out.ogr/db.out.ogr.html
===================================================================
--- grass/trunk/scripts/db.out.ogr/db.out.ogr.html 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/scripts/db.out.ogr/db.out.ogr.html 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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/trunk/scripts/db.out.ogr/db.out.ogr.py
===================================================================
--- grass/trunk/scripts/db.out.ogr/db.out.ogr.py 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/scripts/db.out.ogr/db.out.ogr.py 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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/trunk/scripts/v.in.e00/v.in.e00.py
===================================================================
--- grass/trunk/scripts/v.in.e00/v.in.e00.py 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/scripts/v.in.e00/v.in.e00.py 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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/trunk/scripts/v.in.gps/v.in.gps.py
===================================================================
--- grass/trunk/scripts/v.in.gps/v.in.gps.py 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/scripts/v.in.gps/v.in.gps.py 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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/trunk/scripts/v.in.gps/v.in.gpsbabel
===================================================================
--- grass/trunk/scripts/v.in.gps/v.in.gpsbabel 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/scripts/v.in.gps/v.in.gpsbabel 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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/trunk/scripts/v.in.wfs/v.in.wfs.py
===================================================================
--- grass/trunk/scripts/v.in.wfs/v.in.wfs.py 2014-12-02 22:05:35 UTC (rev 63338)
+++ grass/trunk/scripts/v.in.wfs/v.in.wfs.py 2014-12-02 22:10:00 UTC (rev 63339)
@@ -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