## DESCRIPTION

s.out.ascii converts an existing site list file (input=name) into an ASCII listing of site locations and (optionally) their category labels, in a format suitable for input to other program).

Each line of output consists of the easting, northing, and category label for a site listed in the named vector points (sites) file. The fs=name option (where name is either a character, a space, or a tab) can be used to place a particular field separator between these three output fields. This is useful when output is to be manipulated by other programs, like awk or sed.

The GRASS program s.in.ascii can be used to perform the reverse function, converting a UNIX file containing eastings, northings, and category labels associated with site locations into GRASS site list file format.

## OPTIONS

### Flags:

-a
  Output all sites found in the named vector points file, rather than limiting output to sites falling within the current geographic region.
-d
  Include site descriptions (category labels) in the output.
-i
  Include site attribute identifiers in the output

### Parameters:

input=name
  Name of an existing site list file.
fs=character|space|tab
  The field separator to be placed between the easting, northing, and (optionally) category label on each line of output. The field separator can be a character, a space, or a tab.
  Default: space

s.out.ascii can be run either non-interactively or interactively. The program will be run non-interactively if the user specifies the name of an existing site list file and (optionally) a value for fs, using the form

  s.out.ascii [-adi] input=name [fs=character|space|tab]

where name is the name of an existing site list file to be converted to a brief ASCII listing, and fs is the field separator to be placed between output fields. The user can also the -a and -d options to use all sites in the named sites file and to include site descriptions in the output.

Alternately, the user can simply type s.out.ascii on the command line, without program arguments. In this case, the user will be prompted for parameter values using the standard GRASS parser interface.

## NOTES

To output GRASS data in x,y,z ASCII style, the s.out.ascii may be used:

  s.out.ascii -d input=sitesmap

Resulting to:

         3566393.75 5773293.75 168.3
         3566818.75 5773293.75 158.8
         3568843.75 5773293.75 114.3
         3568981.25 5773293.75 117.5
         [...]

To export raster maps into this x,y,z format, the raster map can be converted to sites format using r.to.sites and s.out.ascii subsequently as described above.

The output from s.out.ascii may be placed into a file by using the UNIX redirection mechanism; e.g.:

  s.out.ascii input=archsites > out.file

s.out.ascii output may also be redirected into other programs; e.g.:

  s.out.ascii input=archsites | d.points color=red size=10 type=diamond

## SEE ALSO

d.points
d.vect
s.in.ascii
r.to.vect

## AUTHOR

Michael Shapiro, U.S. Army Construction Engineering Research Laboratory

Last changed: $Date: 2011-11-08 03:29:50 -0800 (Tue, 08 Nov 2011) $