v.out.ascii(1grass)


NAME

   v.out.ascii    -   Exports  a  vector  map  to  a  GRASS  ASCII  vector
   representation.
   By default only features with category  are  exported.  To  export  all
   features use 'layer=-1'.

KEYWORDS

   vector, export, ASCII

SYNOPSIS

   v.out.ascii
   v.out.ascii --help
   v.out.ascii          [-ocr]          input=name          [layer=string]
   [type=string[,string,...]]   [output=name]    [columns=name[,name,...]]
   [cats=range]    [where=sql_query]  format=string  [separator=character]
   [precision=integer]   [--overwrite]  [--help]   [--verbose]   [--quiet]
   [--ui]

   Flags:
   -o
       Create old (version 4) ASCII file

   -c
       Include column names in output (points mode)

   -r
       Only export points falling within current 3D region (points mode)

   --overwrite
       Allow output files to overwrite existing files

   --help
       Print usage summary

   --verbose
       Verbose module output

   --quiet
       Quiet module output

   --ui
       Force launching GUI dialog

   Parameters:
   input=name [required]
       Name of input vector map
       Or data source for direct OGR access

   layer=string
       Layer number or name ('-1' for all layers)
       A  single  vector map can be connected to multiple database tables.
       This number determines which table to use. When  used  with  direct
       OGR access this is the layer name.
       Default: 1

   type=string[,string,...]
       Input feature type
       Options: point, line, boundary, centroid, area, face, kernel
       Default: point,line,boundary,centroid,area,face,kernel

   output=name
       Name for output ASCII file or ASCII vector name if '-o' is defined
       If not given or '-' then standard output

   columns=name[,name,...]
       Name of attribute column(s) to be exported (point mode)
       "*" for all columns

   cats=range
       Category values
       Example: 1,3,7-9,13

   where=sql_query
       WHERE conditions of SQL statement without 'where' keyword
       Example: income < 1000 and inhab >= 10000

   format=string [required]
       Output format
       Options: point, standard, wkt
       Default: point
       point: Simple point format (point per row)
       standard: GRASS ASCII vector format
       wkt: OGC well-known text

   separator=character
       Field separator
       Field separator (points mode)
       Default: pipe

   precision=integer
       Number of significant digits (floating point only)
       Options: 0-32
       Default: 8

DESCRIPTION

   v.out.ascii  converts  a  GRASS  vector map in binary format to a GRASS
   vector map in ASCII format. Using flag -o v.out.ascii output will be in
   old (version 4) ASCII format.

   If  the output parameter is not given then the data is sent to standard
   output.

NOTES

   The v.in.ascii module performs the function of v.out.ascii in  reverse;
   i.e.  it  converts  vector maps in ASCII format to their binary format.
   These two companion modules are useful both for importing and exporting
   vector maps between GRASS and other software, and for transferring data
   between machines.

   If old version is requested,  the  output  files  from  v.out.ascii  is
   placed        in       the       $LOCATION/$MAPSET/dig_ascii/       and
   $LOCATION/$MAPSET/dig_att directory.

   If layer > 0  then  only  features  with  a  category  number  will  be
   exported.  Use  v.category  to add them if needed or define layer=-1 to
   export also features without category.

   v.out.ascii in the old version mode (-o) does  not  copy  the  dig_cats
   file associated with the binary vector input map to the new output file
   name. The user must copy the dig_cats file to the new  output  name  if
   this is desired (e.g. using the UNIX cp command).

   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 v.to.points and then exporting with v.out.ascii in points mode.

EXAMPLES

   Standard mode
   See ASCII format specification.

   v.out.ascii input=quads format=standard
   ORGANIZATION: US Army Const. Eng. Rsch. Lab
   DIGIT DATE:   May 1987
   DIGIT NAME:   grass
   MAP NAME:     Quads
   MAP DATE:     May 1987
   MAP SCALE:    24000
   OTHER INFO:
   ZONE:         13
   MAP THRESH:   18.288000
   VERTI:
   B  4
    599587.1820962 4914067.53414294
    589639.15126831 4913922.5687301
    589440.96838162 4927803.62500018
    599375.87959179 4927959.83330436
   B  2
    599375.87959179 4927959.83330436
    599587.1820962 4914067.53414294
   B  4
    599587.1820962 4914067.53414294
    609541.5508239 4914236.0597482
    609316.10665227 4928116.8490555
    599375.87959179 4927959.83330436
   C  1 1
    594125.63    4921115.58
    1     1
   C  1 1
    604433.84    4921087.1
    1     2

   Point mode
   v.out.ascii input=quads format=point
   594125.63|4921115.58|1
   604433.84|4921087.1|2
   Print also selected attributes:
   v.out.ascii input=geodetic_pts format=point where="cat > 5 and cat <= 8" columns=GEOD_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
   To print all attributes type columns=*:
   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

   WKT mode
   WKT is abbreviation for Well-known text.
   v.out.ascii input=quads format=wkt
   POLYGON((599587.18209620 4914067.53414294, 589639.15126831 4913922.56873010,
            589440.96838162 4927803.62500018, 599375.87959179 4927959.83330436,
            599587.18209620 4914067.53414294))
   POLYGON((599587.18209620 4914067.53414294, 599375.87959179 4927959.83330436,
            609316.10665227 4928116.84905550, 609541.55082390 4914236.05974820,
            599587.18209620 4914067.53414294))

SEE ALSO

    v.category, v.in.ascii, v.to.points

   GRASS ASCII vector format specification
   GRASS SQL interface

AUTHORS

   Michael Higgins, U.S. Army Construction Engineering Research Laboratory
   James   Westervelt,   U.S.   Army   Construction  Engineering  Research
   Laboratory
   Radim Blazek, ITC-Irst, Trento, Italy
   Attribute selection added by Martin Landa, Czech  Technical  University
   in Prague, Czech Republic (2008/12)

   Last changed: $Date: 2014-05-13 17:16:33 +0200 (Tue, 13 May 2014) $

SOURCE CODE

   Available at: v.out.ascii source code (history)

   Main  index  | Vector index | Topics index | Keywords index | Graphical
   index | Full index

    2003-2016 GRASS Development Team, GRASS GIS 7.2.0 Reference Manual





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.