v.in.arc.poly(1)	      Grass User's Manual	      v.in.arc.poly(1)



NNAAMMEE
       vv..iinn..aarrcc..ppoollyy  - Import areas from ARC/INFO ungenerate format.
       _(_G_R_A_S_S _V_e_c_t_o_r _D_a_t_a _I_m_p_o_r_t _P_r_o_g_r_a_m_)



SSYYNNOOPPSSIISS
       vv..iinn..aarrcc..ppoollyy _A_R_C_/_I_N_F_O_-_f_i_l_e _G_R_A_S_S_-_v_e_c_t_o_r_f_i_l_e



OOBBJJEECCTTIIVVEESS::
       The  two programs and the shell-script are made for importing area data
       created by ARC/INFO-UNGENERATE to GRASS. The main problems  when  using
       v.in.arc followed by v.support directly are errors in the assignment of
       the area labels to the polygons. This is caused by polygons with  iden-
       tical  starting	points (first data pair), which are used for assigning
       the nodes. During this node creation in v.support the node of polygon 1
       may  be	located within the area of polygon2 due to internal approxima-
       tion processes. In this case, no area labels are  assigned.   To  solve
       this problem, the whole file has to be scanned and searched for identi-
       cal starting points. The coordinates of either one of the polygon-pairs
       with  identical	starting  points  have	to be permutated. Then, during
       v.support, different nodes will be created and the  assignment  of  the
       area labels will be done correctly.



SSTTRRUUCCTTUURREE OOFF IINNPPUUTT DDAATTAA
       We have got our ARC/INFO files in the following format:
		  1    3457065.250000	 6095126.000000
	   3457198.000000    6096357.500000
	   3457459.750000    6095341.500000
	   3457321.500000    6094720.000000
	   3457247.500000    6094485.500000
	   3457247.500000    6094485.500000
	   3456976.250000    6094512.000000
	   3456552.250000    6094553.500000
	   3456552.250000    6094553.500000
	   3456630.250000    6094656.000000
	   3457078.250000    6095642.500000
	   3457198.000000    6096357.500000
       END
       END
	The first line specifies the polygon ID and the label points. The fol-
       lowing lines define the x and y coordinates (here in  a	Gauss  Krueger
       projection) until the keyword END.

       Thus,  all  informations  needed  for  v.in.arc, i.e. the polygons, the
       label points and the label text, are collected in this file.



IINN__AARRCC
       The first program "in_arc.c" extracts these informations from the orig-
       inal  file  and	creates  the  lines file, the label point file and the
       label text file. During this process, each polygon gets	a  unique  ID,
       starting  with  1.  The correlation to the original ID is stored in the
       label text file.



PPEERRMMUUTT
       Based on this data structure, the  program  "permut"  scans  the  whole
       polygon file for identical nodes and removes these nodes by permutation
       of the data points. This is done in several iteration steps, until  all
       identical  nodes  are removed. The program uses a temporary file, which
       will be copied after each iteration step to  the  original  file.  Thus
       after  finishing the program, the original file contains the permutated
       polygons.



vv..iinn..aarrcc..ppoollyy
       This shell script has been written to import the ARC/INFO data automat-
       ically  into  GRASS,  using  these  two conversion programs. It will be
       called by:
	    v.in.arc.poly ARC/INFO-file GRASS-vectorfile
	First, this shell script runs in_arc to extract the lines, label point
       and  label text information. It places the created files (*.ply, *.pnt,
       *.txt) into the /arc directory of the current mapset. Second, the  pro-
       gram permut will be called, replacing the *.ply file created by in_arc.
       In the steps 3 and 4, the data will  be	imported  using  v.in.arc  and
       v.support,  resulting  in  the  GRASS-vectorfile specified when calling
       v.in.arc.poly.

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_5 _$



GRASS 5.0						      v.in.arc.poly(1)
