[GRASS5] Re: [5.7] remove islands and U-dangles?

Hamish hamish_nospam at yahoo.com
Tue May 11 19:42:56 EDT 2004


> > The following patch makes the -d (dissolve) function of v.extract
> > work.(this is against today's CVS)
> > 
> > It works, but probably needs some cleanup before putting in CVS..

I'll try and do this today..


> > Also, 'v.extract type=area list=1,2,3' keeps areas with missing
> > centroids; how do you automatically add missing centroids so you can
> > then get rid of the zombie areas with another [xxxxxxxx]?
=> 'v.extract -d list=1-50000'

I thought 'v.clean tool=bpol' would do this, but it doesn't.
Should it? Or should/is this better in another tool?

If the number of left-over broken areas is small, then for now you can
remove them with v.digit.. :/


> I have tested the module patch with part of the spearfish location and
> made some screeshots. Maybe I can help to make it clearer.
> 
> 1) http://www.gdf-hannover.de/dassau/muell/d.vect.png
> 
> Visualize spearfish soils data:
> d.vect soils where='cat<20'
> 
> 2) http://www.gdf-hannover.de/dassau/muell/v.extract.png
> 
> Using v.extract without dissolve option
> v.extract in=soils out=soils2 type=area,centroid where='cat<20'
> 
> -> extracted areas within areas don't have an centroid anymore but are
> still visualized, although they should be deleted, as with d.vect.
> Topologically, this might be correct, because an area is surrounded by
> boundaries, but it should not be displayed, I think.

See above. I don't know the solution to this.
Is this a display bug or a topology bug?

** note ps.map->vector fill has this problem too **


> 3) http://www.gdf-hannover.de/dassau/muell/v.extract_d.png
> 
> Using v.extract with dissolve option
> v.extract -d in=soils out=soils3 type=area,centroid where='cat<20'
> 
> -> areas with cat<20 are dissolved (very nice), but now areas with
> dublicated centroids exist. And areas cat='21 and 43' still exist but
> without centroid, as in example 2. 

v.clean tool=rmdac   # remove duplicate area centroids

I'm not sure how it decides which one to keep, but I'd suspect the
area's cat might not be correct after this step. 

Probably extract.c's dissolve needs to work on centroids somehow (right
now it's only boundaries).



Hamish




More information about the grass-dev mailing list