trimming excess nodes

Malcolm Williamson malcolm at cast.uark.edu
Wed Apr 27 10:11:40 EDT 1994


> 
> Hi, I am trying to trim out excess nodes.  
> 
> Unfortunately v.trim also seems to trim out all islands, I have 
> well over a hundred islands.  I also have thousands
> of excess nodes and editting the file is a pain with that many
> line segments.  
> 
> I suspect that it removes islands because it finds that there are
> only 2 lines off the node and they are the same area edge, so 
> it decides the node is irrelevant.  Unfortunately you can't take
> ALL nodes from an island and still have valid topography.
> 
> Any ideas?
> 
> 
> Sue Huse
> CEDR - REGIS
> University of California, Berkeley
> 

Hi, Susan
How are things out there? I've been giving your problem some thought, and I
have a suggestion for a rather inelegant solution. You could generate an ASCII
vector file from the binary vector file, then write an awk script to extract
only the single node islands from it. (You would look at the sub-header for
each block of coordinates - "A 15" - and then compare the following record to
the fifteenth following record. If they are the same, then the block of 
coordinates should be written to a new file. I didn't claim that it would be
easy!) Run v.trim on your original vector layer, then patch the single-node
islands back in.

That's the best that I can think of!
-- 
Malcolm D. Williamson - Research Assistant       E-mail: malcolm at cast.uark.edu
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-3846 
University of Arkansas              
Fayetteville, AR 72701



More information about the grass-user mailing list