directions for v.in.arc

Agustin Lobo alobo at ija.csic.es
Thu Jul 8 09:01:07 EDT 1999


Hi!

I've just imported some *.e00 files
to grass through ARCINFO. I've made a 
text document with the details of EVERY
step. Hope others wont lose as much time
as I have!

Agus
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

IMPORTING *.e00 to ARCINFO, CREATING THE FILES REQUIRED BY v.in.arc
AND RUNNING v.in.arc

alobo at ija.csic.es (July 1999)

1. Start arcinfo by typing
arcinfo

2. Import your e00 file:
Arc: IMPORT COVER vgeul2gg.e00 VGEUL2GG

3. Create the first ungenerate file:
Arc: UNGENERATE LINE VGEUL2GG vgeul2gg.lin

NOTE: you MUST use the LINE option regardless 
you are exporting lines or polygons to grass.
v.in.arc will take care of this question
afterwards.

4. Create the second ungenerate file:
Arc: UNGENERATE POINT VGEUL2GG vgeul2gg.lab

5. Create the file with attributes:
5.1. Start info
Arc: info
 INFO  EXCHANGE  CALL
08/07/1999  11:57:40
 INFO  9.42  11/11/86  52.74.63*
 Copyright (C) 1994 Doric Computer Systems International Ltd.
 All rights reserved.
 Proprietary to Doric Computer Systems International Ltd.
 US Govt Agencies see usage restrictions in Help files (Help Restrictions)
 ENTER USER NAME>

In my system I enter
arc
as USER NAME
 ENTER USER NAME>arc   
 
 ENTER COMMAND >

5.2. Select the PAT info file created by IMPORT:
 ENTER COMMAND >directory
 TYPE NAME                            INTERNAL NAME    NO. RECS LENGTH 
EXTERNL
  DF  VGEUGG.TIC                        ARC0000DAT           71     12    
XX
  DF  VGEUGG.BND                        ARC0001DAT            1     16    
XX
  DF  VGEUGG.PAT                        ARC0002DAT         4160     20    
XX

 ENTER COMMAND >select VGEUGG.PAT
    4160 RECORD(S) SELECTED

5.3. Define an ascii file as output:

 ENTER COMMAND >output vgeugg.txt

5.4. "Print" the info file into the ascii file:
 ENTER COMMAND >print

6. You should have files like:


%more /users/geodin/gloria/agusti/vgeugg.lin

more vgeugg.lin
      1690
         23.990833         71.037766
         23.977499         71.039719
         23.968330         71.043610
.../...
         24.105831         71.048050
         24.123053         71.045273
         24.115000         71.041931
         24.101665         71.039719
         24.074997         71.037766
         24.039164         71.039444
         24.023888         71.037491
         24.008053         71.037216
         23.990833         71.037766
END
      1693
         24.768887         71.022217
         24.737499         71.028046
.../...
         24.848608         71.093307
         24.853613         71.089981
         24.846664         71.083588
         24.843887         71.078873
         24.847498         71.073868
END
etc
(the .../... just indicate deleted lines)

%more /users/geodin/gloria/agusti/vgeugg.lab
         0         19.263294         58.363926
         2         25.739523         70.986565
         1         25.554712         69.857948
         3         24.730162         71.050690
         5         24.038237         71.049332
         4         25.000187         71.021637
         9         24.042933         70.944962
         6         24.665106         70.992973
        10         24.249376         70.856796
        12         22.612419         70.582985
        13         23.028830         70.836044
         7         27.190071         70.783203
etc

%more /users/geodin/gloria/agusti/info/vgeugg.txt
      1       -595.503    1,482.929     1       0     SEA
      2          0.099        3.471     2       2     A1
      3         11.829       63.930     3       1     A1
      4          0.009        0.639     4       3     A1
      5          0.005        0.665     5       5     A1
      6          0.003        0.275     6       4     A1
      7          0.021        1.494     7       9     A1
      8          0.003        0.404     8       6     A1
      9          0.001        0.182     9      10     A1
     10          0.177        6.449    10      12     A1
etc

7. Quit info and arc by typing

 ENTER COMMAND >quit sop
Arc: quit
Exiting ARC ...
%

8. Import to grass

8.1. Create a $LOCATION/arc directory and copy your 3 files there.
8.2. EDIT the  txt file (vgeugg.txt in this example) and DELETE all
",". We call the new txt file vgeugg2.txt here.

8.3. Run v.in.arc

In my case, I used the 5th col as cat and the 6th as attribute:

v.in.arc type=polygon lines_in=vgeugg.line points_in=vgeugg.lab
text_in=vgeugg2.txt vector_out=vgeugg.v idcol=5 catcol=5 attcol=6

alobo at silvestre:~/grass/eurostat/vgeu/arc > v.in.arc type=polygon 
lines_in=vgeugg.line points_in=vgeugg.lab
text_in=vgeugg2.txt vector_out=vgeugg.v idcol=5 catcol=5 attcol=6

Coverage type = polygon


The LABEL-TEXT file has been scanned. There are 4161
lines in the file and 6 columns in the file

Working...

v.in.arc finished.


Before vector file <delme> can be used in the 'v.digit' program:
Run the program v.support to build the needed support files.

alobo at silvestre:~/grass/eurostat/vgeu/dig_cats > v.support vgeugg.v


   V.SUPPORT:


Selected information from vector header
 Organization:   
 Map Name:      vgeugg.v
 Source Date:   
 Orig. Scale:   0
 No snapping will be done 

    Reading Vector file.
 100%
    Building areas
    Building islands
ls -l
d.mon s    Attaching labels
tart=x0
d.vect  Number of lines:   7712
 Number of nodes:   5870
 Number of areas:   4159
 Number of isles:   2317
 Number of atts :   4159
 Number of unattached atts :   0
 Snapped lines  :   0
alobo at silvestre:~/grass/eurostat/vgeu/dig_cats > d.what.vect vgeugg.v

Buttons
 Left:  what's here
 Right: quit

       7:46:46.706587W  40:41:12.57485N
Line - Category <not tagged>
Area - Category 2837 S4 
Size - Sq Meters: 54743224768.509               Hectares: 5474322.477
           Acres: 13527016.909          Sq Miles: 21135.9639

       7:29:44.91018W  38:24:58.203593N
Line - Category <not tagged>
Area - Category 3314 M4a 
Size - Sq Meters: 80971672082.582               Hectares: 8097167.208
           Acres: 20008049.983          Sq Miles: 31262.5781






****NOTE NEW PHONE NUMBER*****
Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es
http://pangea.ija.csic.es/alobo




More information about the grass-user mailing list