[GRASS-user] r.to.vect and then v.clean using tool=rmarea createspolygonsinstead of holes.

Moskovitz, Bob Bob.Moskovitz at conservation.ca.gov
Fri Dec 12 15:01:20 EST 2008


Upon closer inspection, I see what you are talking about.  I do want to remove holes <= 2800 m, so this method won't work for me.  So, what would cause r.to.vect to create areas without centroids?  And why haven't v.clean rmarea filled all of my holes since they all don't have centroids?

> -----Original Message-----
> From: Markus Metz [mailto:markus.metz.giswork at googlemail.com]
> Sent: Friday, December 12, 2008 5:31 AM
> To: grass-user at lists.osgeo.org; Moskovitz, Bob
> Subject: Re: [GRASS-user] r.to.vect and then v.clean using tool=rmarea
> createspolygonsinstead of holes.
> 
> 
> 
> 
> Hamish wrote:
> > Bob Moskovitz wrote:
> >   
> >> I followed your suggestion, but I'm still getting the
> >> same problem.  It seems strange that v.to.rast would create
> >> a vector file that has flawed topology.  Do you know of any
> >> alternative to v.clean with rmarea?
> >>     
> >
> > v.db.addcol area
> > v.to.db option=area
> > v.extract where="area > 2800"
> > ?
> >   
> That only deletes the centroids of these small areas, the 
> boundaries remain.
> 
>  From your original post:
> vector <lszone10> has
> 27613 areas
> 17107 isles
> Number of areas without centroid: 11425
> 
> vector <lszone10_clean> has
> Number of areas: 1362
> Number of isles: 1127
> Number of duplicate centroids: 3
> Number of areas without centroid: 637
> 
> Further on, 26251 areas have been removed.
> v.clean tool=rmarea also removes areas without centroids, that's why
> holes have been replaced by polygons, boundaries of small areas are
> deleted. If you want to merge small areas with adjacent large areas,
> v.clean would do the job, but for all areas, also areas 
> without centroid.
> If you want to keep only larger areas and these unchanged, 
> the method of
> Hamish with v.extract would do that.
> Or you could do
> v.db.addcol map=lszone10 columns="area DOUBLE"
> v.to.db map=lszone10 option=area columns=area
> and then use where="area > 2800" in further operations.
> 
> Markus
> 
> 
> 


More information about the grass-user mailing list