[GRASS-SVN] r53279 - grass/trunk/vector/v.out.ascii

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 28 04:57:02 PDT 2012


Author: martinl
Date: 2012-09-28 04:57:01 -0700 (Fri, 28 Sep 2012)
New Revision: 53279

Modified:
   grass/trunk/vector/v.out.ascii/args.c
   grass/trunk/vector/v.out.ascii/main.c
   grass/trunk/vector/v.out.ascii/v.out.ascii.html
Log:
v.out.ascii: add support for `columns=*` (see #1744)


Modified: grass/trunk/vector/v.out.ascii/args.c
===================================================================
--- grass/trunk/vector/v.out.ascii/args.c	2012-09-28 11:49:25 UTC (rev 53278)
+++ grass/trunk/vector/v.out.ascii/args.c	2012-09-28 11:57:01 UTC (rev 53279)
@@ -30,11 +30,11 @@
     output_opt->label = _("Name for output ASCII file "
 			  "or ASCII vector name if '-o' is defined");
     output_opt->description = _("'-' for standard output");
-    output_opt->required = NO;
     output_opt->answer = "-";
 
     column_opt = G_define_standard_option(G_OPT_DB_COLUMNS);
-    column_opt->description = _("Name of attribute column(s) to be exported (point mode)");
+    column_opt->label = _("Name of attribute column(s) to be exported (point mode)");
+    column_opt->description = _("\"*\" for all columns");
     column_opt->guisection = _("Points");
     
     cats_opt = G_define_standard_option(G_OPT_V_CATS);

Modified: grass/trunk/vector/v.out.ascii/main.c
===================================================================
--- grass/trunk/vector/v.out.ascii/main.c	2012-09-28 11:49:25 UTC (rev 53278)
+++ grass/trunk/vector/v.out.ascii/main.c	2012-09-28 11:57:01 UTC (rev 53279)
@@ -8,7 +8,7 @@
  *             Martin Landa, CTU in Prague, Czech Republic (v.out.ascii.db merged & update (OGR) for GRASS7)
  *
  * PURPOSE:    Writes GRASS vector data as ASCII files
- * COPYRIGHT:  (C) 2000-2009, 2011 by the GRASS Development Team
+ * COPYRIGHT:  (C) 2000-2009, 2011-2012 by the GRASS Development Team
  *
  *             This program is free software under the GNU General
  *             Public License (>=v2). Read the file COPYING that comes

Modified: grass/trunk/vector/v.out.ascii/v.out.ascii.html
===================================================================
--- grass/trunk/vector/v.out.ascii/v.out.ascii.html	2012-09-28 11:49:25 UTC (rev 53278)
+++ grass/trunk/vector/v.out.ascii/v.out.ascii.html	2012-09-28 11:57:01 UTC (rev 53279)
@@ -24,11 +24,11 @@
 exported. Use <em><a href="v.category.html">v.category</a></em> to add
 them if needed.
 
-<p><em>v.out.ascii</em> does not copy the <tt>dig_cats</tt> file
-associated with the binary vector <b>input</b> map to the
-new <b>output</b> file name. The user must copy the <tt>dig_cats</tt>
-file to the new <b>output</b> name if this is desired (e.g. using the
-UNIX <em>cp</em> command).
+<p><em>v.out.ascii</em> in the old version mode (<b>-o</b>) does not
+copy the <tt>dig_cats</tt> file associated with the binary
+vector <b>input</b> map to the new <b>output</b> file name. The user
+must copy the <tt>dig_cats</tt> file to the new <b>output</b> name if
+this is desired (e.g. using the UNIX <em>cp</em> command).
 
 <p>It is possible to output the coordinates of vertices in a non-points vector
 feature by first converting the vector feature to a points map with 
@@ -40,6 +40,8 @@
 
 <h3>Standard mode</h3>
 
+See <a href="vectorascii.html">ASCII format</a> specification.
+
 <p><div class="code"><pre>
 v.out.ascii input=quads format=standard
 
@@ -83,14 +85,25 @@
 604433.84|4921087.1|2
 </pre></div>
 
+Print also selected attributes:
+
 <div class="code"><pre>
-v.out.ascii input=archsites format=point where="cat > 5 and cat <= 8" columns=str1
+v.out.ascii input=geodetic_pts format=point where="cat > 5 and cat <= 8" columns=GEOD_NAME
 
-600375|4925235|6|Prairie Site
-606635|4920773|7|Jensen Pass
-595755|4925300|8|No Name
+573638.06289275|271623.25042595|6|27 WC 6
+574416.81289275|274116.65542595|7|27 WC 7
+575301.31189275|275303.81342595|8|27 WC 8
 </pre></div>
 
+To print all attributes type <b>columns=*</b>:
+
+<div class="code"><pre>
+v.out.ascii input=geodetic_pts format=point where="cat > 5 and cat <= 8" columns=*
+573638.06289275|271623.25042595|6|6|0.00000000|0.00000000|6|6|27 WC 6|573638.09200000|271623.24100000|0.00|0|1.00000000|1.00000000
+574416.81289275|274116.65542595|7|7|0.00000000|0.00000000|7|7|27 WC 7|574416.84100000|274116.64900000|0.00|0|1.00000000|1.00000000
+575301.31189275|275303.81342595|8|8|0.00000000|0.00000000|8|8|27 WC 8|575301.30600000|275303.82600000|0.00|0|1.00000000|1.00000000
+</pre></div>
+
 <h3>WKT mode</h3>
 
 WKT is abbreviation
@@ -113,10 +126,11 @@
 <em>
 <a href="v.category.html">v.category</a>,
 <a href="v.in.ascii.html">v.in.ascii</a>,
-<a href="v.to.points.html">v.to.points</a><br>
+<a href="v.to.points.html">v.to.points</a>
+</em>
+<p>
 <a href="vectorascii.html">GRASS ASCII vector format</a> specification<br>
 <a href="sql.html">GRASS SQL interface</a>
-</em>
 
 <h2>AUTHORS</h2>
 



More information about the grass-commit mailing list