s.in.ascii(1)		      Grass User's Manual		 s.in.ascii(1)



NNAAMMEE
       ss..iinn..aasscciiii   -  Converts  an  ASCII listing of site locations and their
       descriptions into a GRASS site list file.
       _(_G_R_A_S_S _S_i_t_e_s _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       ss..iinn..aasscciiii
       ss..iinn..aasscciiii hheellpp
       ss..iinn..aasscciiii ssiitteess==_n_a_m_e [iinnppuutt==_n_a_m_e]  [dd==_v_a_l_u_e]  [ffss==_c_h_a_r_a_c_t_e_r_|_s_p_a_c_e_|_t_a_b]
       [ddaattee==_t_i_m_e_s_t_a_m_p[/_t_i_m_e_s_t_a_m_p]]

DDEESSCCRRIIPPTTIIOONN
       _s_._i_n_._a_s_c_i_i  converts  an  ASCII	listing of site locations and category
       labels into a file in GRASS site list file format.


       Input can be entered via standard input or from	the  file  iinnppuutt==_n_a_m_e.
       Each line of input should contain the easting, northing, and either the
       category value or category label associated with a site.   The  ffss==_n_a_m_e
       option  (where  _n_a_m_e  is  either a character, a space, or a tab) can be
       used to specify the use of a particular field separator	between  these
       three  input  fields.  This is useful when input is obtained from other
       programs (see NOTES, below).  Output is stored in the  file  ssiitteess==_n_a_m_e
       and  placed  in	the  site_lists/  directory  under  the user's current
       mapset.


       The GRASS program _s_._o_u_t_._a_s_c_i_i can be used to perform the reverse  func-
       tion, converting a file in GRASS site list format into an ASCII listing
       of eastings, northings, and category labels associated with site  loca-
       tions.

   PPaarraammeetteerrss::
       ssiitteess==_n_a_m_e
	      Name of the new GRASS site list file to be output.

       iinnppuutt==_n_a_m_e
	      Name  of	an  existing  ASCII file containing site locations and
	      labels.

       dd==_v_a_l_u_e
	      number of dimensions (default=2)

       ffss==_c_h_a_r_a_c_t_e_r_|_s_p_a_c_e_|_t_a_b
	      The field separator separating the easting, northing, and  cate-
	      gory  label in each line of the _i_n_p_u_t file.  The field separator
	      can be a character, a space, or a tab.
	      Default: space

       ddaattee==_t_i_m_e_s_t_a_m_p[/_t_i_m_e_s_t_a_m_p]
	      String specifying timestamp or timestamp range.



       _s_._i_n_._a_s_c_i_i can be run either non-interactively or  interactively.   The
       program	will  be run non-interactively if the user specifies a name to
       be assigned to the ssiitteess file output, the name  of  an  existing  ASCII
       file  containing iinnppuutt, and (optionally) a field separator ffss appearing
       in the iinnppuutt file.


       Alternately, the user can simply type ss..iinn..aasscciiii on the	command  line,
       without	program arguments. In this case, the user will be prompted for
       parameter values using the standard GRASS parser interface described in
       the  manual  entry for _p_a_r_s_e_r. If the user does not specify the name of
       an iinnppuutt file containing site locations and category attributes,  these
       should  be  entered to the program via standard input.  The dd parameter
       allows the user	to  specify  that  more  than  2  dimensions  will  be
       imported.  Otherwise  the  third  (or further) column in the iinnppuutt file
       will be treated as an attribute.

       To define a  ddaattee  (timestamp),	several  date  strings	are  accepted.
       Please see _r_._t_i_m_e_s_t_a_m_p for details.



NNOOTTEESS
       IImmppoorrttiinngg ffrroomm ootthheerr GGRRAASSSS pprrooggrraammss


       Other GRASS programs can be used to produce output in a format suitable
       for input to _s_._i_n_._a_s_c_i_i. For example, the user might pipe  output  pro-
       duced  by  _d_._w_h_e_r_e  into  _s_._i_n_._a_s_c_i_i  to create a site list file called
       _m_y_._s_i_t_e_s containing site locations pointed to with the mouse, as illus-
       trated  below.	In this example it is unnecessary to specify the field
       separator used in the input, since _d_._w_h_e_r_e output separates the easting
       and northing values with spaces, and spaces are the default field sepa-
       rator assumed by _s_._i_n_._a_s_c_i_i.


       dd..wwhheerree | ss..iinn..aasscciiii ssiitteess==my.sites



       IImmppoorrttiinngg ffrroomm aa sspprreeaaddsshheeeett


       Data may be imported from  many	spreadsheet  programs  by  saving  the
       spreadsheet  as	a  comma separated variable (.csv) text file, and then
       using  the  "ffss==_,"  command  line  parameter  with  _s_._i_n_._a_s_c_i_i.	  Note
       _s_._i_n_._a_s_c_i_i  currently  requires	there  to be at least three columns of
       data for the import to work properly.


       IImmppoorrttiinngg llaattiittuuddee//lloonnggiittuuddee ddaattaa


       Latitude/longitude data may be imported either in decimal  degree  for-
       mat:


	   8.314824 54.921730 site1
	   8.897605 54.872353 site2
	   9.549371 54.834080 site3

       or in DMS (degree, minutes, seconds) format:


	   8:18:53.3664E 54:55:18.228N site1
	   8:53:51.378E  54:52:20.4708N site2
	   9:32:57.7356E 54:50:02.688N site3



       TTiimmee aass SSttrriinngg AAttttrriibbuutteess


       In this example, we will work with the following site list:

	   10.8 0 9.8 Fri Sep 13 10:00:00 1986 31.4
	   11 5.5 9.9 Fri Sep 14 00:20:00 1985 36.4
	   5.1 3.9 10 Fri Sep 15 00:00:30 1984 28.4

       This  data  has	three dimensions (assume easting, northing, and eleva-
       tion),  five string attributes, and one decimal attribute.

GGRRAASSSS 55..00 iinntteerrnnaall ssiitteess ffoorrmmaatt iinn ssiittee__lliissttss//
       If the user wishes to generate site list files directly,  the  internal
       format is described below.



   HHeeaaddeerr::
	   #any comment, can be inserted anywhere
	   name|mysoils.site
	   desc|3D soils data for location A
	   time|15 Jan 1999
	   labels|east north elevation ID pH Corg color
	   form||||#%%@




   DDaattaa::
       Each  line of the ASCII file should contain either two or three coordi-
       nates (x,y and optionally z)  separated	by  a  pipe  ("|")  character.
       After  the  coordinates	there  should  be trailing pipe character, and
       optionally attribute fields may follow separated from each  other  with
       blank spaces.


       The  attribute  field  may  be  a category number, a decimal value or a
       string.	Category numbers must come first and be preceded  by  the  "#"
       character,  while  string values must be preceded by the "@" character.
       Floating point values may be preceded by the "%" character but if there
       is  no  "#"  or	"@" preceding the attribute then it is assumed to be a
       floating point (FP) value.  Also, string  values  that  contain	blanks
       must be quoted or the part of the string following the first blank will
       be parsed as a separate field, which may cause an error.


       GGeenneerraall ffoorrmm

       easting|northing|[z|[d4|]...][#category_int] [ [@attr_text OR %FP]  ...
       ]


       EExxaammppllee

       739865.8|4279785.5|#2965  %396685  %194919  %2.473222  @"St.Louis"  @MO
       @city


       There can be many dimensions between pipes (|), but no #%@.


       There can be only one cat, preceded by #, after which there may be many
       FP or text attributes.


       For  more  information, see the _G_R_A_S_S _A_S_C_I_I _f_o_r_m_a_t_s page or the _G_R_A_S_S _5
       _P_r_o_g_r_a_m_m_e_r_'_s _m_a_n_u_a_l.



SSEEEE AALLSSOO
       _d_._p_o_i_n_t_s,  _d_._s_i_t_e_s,  _d_._w_h_a_t_._r_a_s_t,  _d_._w_h_e_r_e,  _r_._t_i_m_e_s_t_a_m_p,  _s_._o_u_t_._a_s_c_i_i,
       _p_a_r_s_e_r, _G_R_A_S_S _A_S_C_I_I _f_o_r_m_a_t_s

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

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_3_/_0_8_/_2_0 _0_8_:_1_0_:_1_3 _$



GRASS 5.0							 s.in.ascii(1)
