v.out.arc

Kenn Gardels gardels at ced.berkeley.edu
Mon Nov 2 11:37:56 EST 1992


> > 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).

v.in.arc 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.  v.in.arc 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, v.in.arc 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 ced.berkeley.edu               |
| University of California    Bitnet    gardels at UCBCED                         |
| Berkeley, CA  94720         Calendar  gardels at tahoe.ced.berkeley.edu         |
+------------------------------------------------------------------------------+



More information about the grass-user mailing list