ArcInfo->GRASS

stephan at alla.pl.swf.usace.army.mil stephan at alla.pl.swf.usace.army.mil
Thu Feb 29 07:00:00 EST 1996



Dear Neel:
I have the way to bring Arc Info files into GRASS
while maintaining your attributes. ( Remember - GRASS
itself can only hold one category name - if you'd 
like more attributes, you have to attach a database.)

If you just have one category name to attach like 
a contour file will just have one elevation per line
then you can do it this way...
    
         Say have a contour coverage called elev...

1.  use the UNGENERATE command in ARC

       Arc: UNGENERATE line elev

2.  To transfer the attributes, you must convert them to an 
     ascii file.  One way to do this is to print the
     attribute you want (in this case the attribute is called 
     "elevation") along with the -id# out to a file
     from INFO.  In INFO...

       ENTER COMMAND> SEL ELEV.PAT
       ENTER COMMAND> OUTPUT ELEV.TXT
       ENTER COMMAND> PRINT ELEV-ID,ELEVATION

3.  You should now have a .lin file in your workspace
    and a .txt file in your info directory (unless you 
    specified a path in the OUTPUT command above).

    Move both these files to the GRASS mapset/arc directory.
    If you don't have a directory called "arc" in your mapset,
    just create one.

4.  Start GRASS and use v.in.arc to bring in the file.

    v.in.arc type=line lines_in=elev.lin text_in=elev.txt
             vector_out=grasselev idcol=1 catcol=2
   
    v.support grasselev

NOTE!  The v.in.arc command may get confused if your .txt
         file has special characters in the category name.
         Remove commas from numeric fields.  If labels like
         "Fleet Street" come in as "Fleet" try adding an 
         underscore for the space.  I know it's inconvenient,  
         but at least then your label will stay together.

Good Luck!
    Stephanie :)
*************************************************
     Stephanie L. Miller - Physical Scientist
     U.S. Army Corps of Engineers, Fort Worth
     CESWF-PL-RE
     819 Taylor Street
     P.O. Box 17300
     Fort Worth, Texas 76102-0300
 
     email: stephan at alla.pl.swf.usace.army.mil
     phone: (817)334-2095
     fax: (817)885-7539
***************************************************
     All comments are my own and do
     not represent official poilcy.
***************************************************






More information about the grass-user mailing list