[GRASSLIST:5445] Re: I get the same files from v.out.arc

John Gillette JGillette at rfmd.com
Sun Feb 2 08:50:00 EST 2003


Try this.

v.extract type=area input=<name> output=<new name1> new=0 list=1-100000
v.extract type=line input=<name> output=<new name2> new=0 list=1-100000
v.extract type=edge input=<name> output=<new name3> new=0 list=1-100000

(you might try 0-100000.  see notes below)

Areas are made up of lines of type "AREA"  (celled area or edge by v.extract).
If all the lines are labeled, when you extract the lines you will get ALL
the lines including those that make up areas.

When you extract area, you should only get lines that make up areas that 
have AREA cat numbers (in this case in the range 1-100000).

When you extract edge, you should only get lines that make up areas that 
have LINE cat numbers (in this case in the range 1-100000).

v.extract type=area will give you the area.  Compare this with
v.out.arc type=polygon

If all the lines have cat numbers, the only way I know to separate 
non-area lines is to "v.extract type=edge", then list all the cat 
numbers in the new file. Then manually extract all EXCEPT the edge lines.

Compare to v.out.arc. We should be able to figure out if the 
problem is in v.out.arc or if the problem is in the way Grass
stores the line/area information.

NOTES: (1) v.extract is nice because you can specify ranges
           (you can't do ranges (i.e 2-12) with d.vect.area)
       (2) THERE IS A DIFFERENCE BETWEEN 0-100000
           and 1-100000.  Lines without cat numbers default
           to 0 (I think). On US DLG maps, I think the bounding
           box is lines with no cat numbers.  All others have
           a cat number.

(wish I had more time to help)

John 

> -----Original Message-----
> From: Jeff D. Hamann [mailto:jeff_hamann at hamanndonald.com]
> Sent: Saturday, February 01, 2003 11:26 PM
> To: John Gillette
> Subject: Re: [GRASSLIST:5440] v.trim?
> 
> 
> You're too much help, dude.
> 
>  Ijust posted another message becuase for some reason, when I 
> run v.out.arc
> I get the same results for polygons *and* lines for the same 
> file. I've run
> v.support and the .pol file contains all the entries for the 
> lines, not just
> areas when I use the type=polygon option. I this becuase of 
> something in the
> new lib in the source code? I've had a look but don't know if 
> the source
> code from 5.0.0 was being used (when I used it two days ago). Ugh.
> 
> Jeff.
>




More information about the grass-user mailing list