convert grass raster to arc/info

Nancy Greeley ngreeley at
Thu Apr 15 13:16:40 EDT 1993

Here are some exerpts from responses to previous similar questions on the 
GRASShopper list.  Enjoy:

>From grass-lists-owner at Mon Dec 14 12:17:45 1992
Date: Mon, 14 Dec 92 10:59:41 EST
>From: jimg at (Jim Gasprich)
Subject: Re: GRASS4.0 to Arc/Info 6.1 - How?

Yes, Virginia, there is a way from GRASS to ARC. It's a bit
strange (as well as being documented in an obscure ARC appendix), 
but here's a repost of the way we do the unthinkable:

----- Begin Included Message -----

According to our ARC guru and GRID master, JohnnyB (Dog Jones), the method is  

      1) type this: setenv GISDBASE <GRASS database path>

      2) either move (mv) or eliminate the GRASS color tables

      3) make sure the GRASS raster file does not contain periods (.) in 
         the name 

      4) cd into the ARC workspace

      5) fire up ARC

      6) type in the ARC command: 
         imagegrid <locationname:mapsetname:rastername> <gridname>

      7) then you'll have to make a new shade file in ARC

Confusing ?? Well, that's ARC/INFO for you (heh,heh). I think that they 
refuse to recognize GRASS as a *REAL* GIS package.

Questions can be directed back to me, and I'll consult the Dog master/Arc boy.

----- End Included Message -----

It should also be mentioned that this method will *NOT* work with reclass
files. Just resample to make it work.

Jim Gasprich				e-mail: jimg at
Cook College Remote Sensing Center	fax:    (908) 932-8644
Dept of Natural Resources
Rutgers University
New Brunswick, NJ, O8903  	"Du bist mein Gweckman" - Anonymous Fascist

>From grass-lists-owner at Mon Nov  2 11:50:54 1992
>From: gardels at (Kenn Gardels)
Subject: Re: v.out.arc
Date: Mon, 2 Nov 92 8:37:56 PST

> > Has anyone used v.out.arc successfully? The program exists without error messages when I try to
> > run it. I looked for an updated version on the moon, but a only found a Gmakefile
> > 

I use it quite a bit, with no problems on the v.out.arc side.  What is
the error message that you're getting?

A couple of gotcha's about it though:

- the text output, if requested, creates a file xxx.txt, along with
the .lin and .lab files.  However, this cannot be used with generate
directly, but instead with an add from command in info.  You have
to awk the text file to replace space delimiters with commas.  

- make sure you spell out responses entirely (eg "polygon", "line",
etc). can be even more troublesome, depending on the arc/info
source.  Based on some combination of arc precision and info output
width, the files generated by ungenerate may be in regular floating
point or in exponential notation. doesn't understand
exponential notation, so you have to preprocess the file with awk to
change those to floating point.  Also, arc uses "D" to represent the
exponent, not "E" like everyone else in the world, so you need to
catch that as well (I do it with sed).  Finally, due to a bug (I
think) if you do not specify a text file input, won't read
the label file either.  The easy solution if you have no text file is
to specify the label file for text input, and select column 1 for both
id and cat.  

I've built up a small library of awk/sed scripts to deal with the
vaguaries of this conversion, and will share them as is with anyone
who asks.

| Kenn Gardels                Tel +01 (510) 642-9205   Fax +01 (510) 643-5571  |
| CEDR - 390 Wurster Hall     Internet  gardels at               |
| University of California    Bitnet    gardels at UCBCED                         |
| Berkeley, CA  94720         Calendar  gardels at         |



More information about the grass-user mailing list