Vect to Ascii

% > Joe Leone (Joe.Leone@per.dwe.csiro.au) writes on 11 Oct 94:
% > >I am trying to import map layers into a Graphic/Map package. The
% > >required import format is simialr to that produced by v.out.ascii ,
% > >but not close enough :frowning: .
% > >The format I require is as follows:- > >
% > >unique identifier x,y co-ordinate of pt within the polygon # of nodes
% > >(vertecies)
% >
% > it should not be too difficult to modify v.out.ascii to do this.
% > Is there a library function to give a point-within-polygon?
% > If not, I believe that there may be a routine that says
% > "yes or no" about a point. [don't have the programming
% > manual on site right now]
% >
% > Alternatively, assuming that we only have polygons in the map,
% > we could use v.digit to add Points and then think of some
% > clever way of labelling so that the transformation of
% > v.out.ascii output to your format could be done with awk.

Hello agian,
  I have discovered that the graphics part of the package that I whant to use is a PC based thing called QUICKMAP, apparently used in a number of PC packages. So the question I am really asking is; Does/has anybody use QUICKMAP and/or exported files from GRASS to QUICKMAP. The file extension it uses is .PGN.

Thanks for any help

Joe

Joe Leone (Joe.Leone@per.dwe.csiro.au) writes on 13 Oct 94:

% > Joe Leone (Joe.Leone@per.dwe.csiro.au) writes on 11 Oct 94:
% > >I am trying to import map layers into a Graphic/Map package. The
% > >required import format is simialr to that produced by v.out.ascii ,
% > >but not close enough :frowning: .
% > >The format I require is as follows:- > >
% > >unique identifier x,y co-ordinate of pt within the polygon # of nodes
% > >(vertecies)

to which I responded:

% > it should not be too difficult to modify v.out.ascii to do this.

Joe goes on to add:

I have discovered that the graphics part of the package that I whant
to use is a PC based thing called QUICKMAP, apparently used in a
number of PC packages. So the question I am really asking is;
Does/has anybody use QUICKMAP and/or exported files from GRASS to
QUICKMAP. The file extension it uses is .PGN.

Joe,
I've hacked v.out.ascii so that it writes areas (polygons)
and not area edges. The hack ignored all other types of
vectors (lines, points, and all dead areas/lines/points).
It creates a new mapset element: dig_export.

I've put it on
ftp://pasture.ecn.purdue.edu/pub/mccauley/grass/v.out.quickmap.tar.gz
but there's one catch: I've left the determination of
  "x,y co-ordinate of pt within the polygon"
unfinished. Just a quick exercise in geometry. Also see
the function dig_point_in_area() in the Programmers' Manual
(it's in Chapter 13, page 176 in my version). It tells you
whether a point is IN or OUT of an area.

If you are not a programmer and completing this utility is an
impossible task, ask! I'm sure that someone else on this list could
finish it fairly quickly. It's only 182 lines of C in two files;
main.c and wrtearea.c. I've left bread crumbs in wrtearea.c showing
where more needs to be added.

There's also a man page there - whoever finishes be sure to
add your name to the AUTHOR section.

Best wishes and good luck,

--Darrell
James Darrell McCauley, Purdue Univ, West Lafayette, IN 47907-1146, USA
mccauley@ecn.purdue.edu, mccauley%ecn@purccvm.bitnet, pur-ee!mccauley
http://soils.ecn.purdue.edu/~mccauley