v.in.ascii converts a vector map
in GRASS ASCII vector format to a
vector map in binary format. The module may import two formats:

standard contains all data types, each coordinate on one row

point (default) reads only points, each point defined on
one row. Values are separated by a user-definable delimiter. If
the columns option is not defined, default names are used. It
is possible to specify the column order for the x,y,z coordinates
and category values.

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

The input is read from the file specified by the input option or
from standard input.

The field separator may be a character, the word 'tab'
(or '\t') for tab, 'space' (or ' ') for a blank,
or 'comma' (or ',') for a comma.

An attribute table is only created if it is needed, i.e. when at
least one attribute column is present in the input file besides
geometry columns. The attribute column will be auto-scanned for type, but
may be explicitly declared along with the geometry columns using the
columns parameter.

Use the -z flag to convert ASCII data into a 3D vector map.

In special cases of data import, such as the import of large LIDAR
datasets (millions of data points), it may be necessary to disable
topology support (vector level 1) due to memory constraints. This is
done with the -b flag. As only very few vector modules support
points data processing at vector level 1, usually topology is required
(vector level 2). Therefore it is recommended that the user first try
to import the data without creating a database (the -t flag) or
within a subregion (the -r flag) before resorting to the
disabling of topology.

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 the input file does not contain a category column, there is the
possibility to auto-generate these IDs (categories). To automatically
add an additional column named 'cat', the cat parameter must be
set to the virtual column number 0 (cat=0). This is the
default action if the cat parameter is not set.

Data may be imported from many spreadsheet programs by saving the
spreadsheet as a comma separated variable (.csv) text file, and then
using the separator=',' or separator=comma option
with v.in.ascii in points mode. If the input file
contains any header lines, such as column headings, the
skip parameter should be used. These skipped header lines will
be written to the map's history file for later reference (read with
v.info -h). The skip option only works in points mode.

Any line starting with the hash character ('#') will be treated as
a comment and skipped completely if located in the main data file. If located
in the header, as defined by the skip parameter, it will be treated as
a header line and written to the history file.

The import of DMS formatted degrees is supported (in this case no sign
but N/S, E/W characters are used to indicate the hemispheres). While
the positions are internally translated into decimal degrees during
the import, the original DMS values are maintained in the attribute
table. This requires both the latitude and the longitude columns to be
defined as varchar(), not as numbers. A warning will be
issued which can be ignored. See GRASS
ASCII vector format specification for details.

Although v.in.ascii doesn't have an option to specify which columns
should be imported, you can use a shell filter to achieve the same effect,
e.g.:

# Print out the column number for each field, supposing the file has a header
head -1 input_file | tr '<the_field_separator_character>' '\n' | cat -n
# From the listing, select the columns you want and feed them to v.in.ascii
# use input=- to read from stdin
cut -d<the_field_separator_character> -f<comma-separated_list_of_columns> input_file | v.in.ascii in=- <your_options>

The 'point' string (or some similar entry) is required to generate a database table.
When simply piping the coordinates (and optionally height) without additional column(s)
into v.in.ascii, only the vector map geometry will be generated.