Vector to Ascii output

Joe Leone Joe.Leone at per.dwe.csiro.au
Wed Oct 12 02:59:46 EDT 1994


 
> Joe Leone (Joe.Leone at 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 :-( .  
> >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.


Greeting again,

The problem with v.out.ascii is that output is split into line. For example the output below is from a square made of two line segments. ie it has two nodes.



ORGANIZATION: US Army Const. Eng. Rsch. Lab
DIGIT DATE:   
DIGIT NAME:   
MAP NAME:     
MAP DATE:     
MAP SCALE:    10
OTHER INFO:   
ZONE:         0
WEST EDGE:    751.465
EAST EDGE:    3427.435
SOUTH EDGE:   1812.095
NORTH EDGE:   3612.905
MAP THRESH:   0
VERTI:
A  2
 1893.95      1041.4      
 1897.78800991 2173.612922 
A  5
 1897.78800991 2173.612922 
 1901.6       3298.15     
 3531.05      3305.8      
 3523.4       873.1       
 1893.95      1041.4 

What I would like is ( apart from a point within the square ) is the following output

ORGANIZATION: US Army Const. Eng. Rsch. Lab
DIGIT DATE:   
DIGIT NAME:   
MAP NAME:     
MAP DATE:     
MAP SCALE:    10
OTHER INFO:   
ZONE:         0
WEST EDGE:    751.465
EAST EDGE:    3427.435
SOUTH EDGE:   1812.095
NORTH EDGE:   3612.905
MAP THRESH:   0
VERTI:
A          6
 1893.95      1041.4      
 1897.78800991 2173.612922 
 1901.6       3298.15     
 3531.05      3305.8      
 3523.4       873.1       
 1893.95      1041.4 


Thanks 
Joe Leone



More information about the grass-user mailing list