[GRASS5] filtering vector areas

Michael Barton michael.barton at asu.edu
Sat Jun 19 13:43:37 EDT 2004


On Jun 19, 2004, at 3:01 AM, grass5-request at grass.itc.it wrote:

> Dear list,
>
> Currently I try to classify aerial images (30cm resolution) in order 
> to get a generalized vector landcover map. Since the SMAP results 
> contain lots of small areas. I use r.neighbour (again and again) to 
> filter those areas and then convert the results into vector format.
>
> unfortunately those map still contains about 60000 polygons and most 
> of them are smaller than maybe 50sqm. How is it possible to delete 
> those polygons with different category values? I don't need them on 
> the map?
>
> I would like to dissolve them according to their area size and/or 
> maybe their category value for example and put them to one of the 
> larger neighbour areas. I tried already the -d parameter in the 
> v.extract module established by Radim and Hamish (my last test was on 
> 17.June from CVS) - thanks a lot for this help! - but this problem 
> probably can't be solved with it.

Your subject talks about vector areas and you mention polygons. 
However, if you are using r.neighbors and SMAP, you are dealing with 
raster files. Perhaps you initially worked with raster files and then 
converted them to areas??

Anyway, prior to conversion to vectors, you could run r.reclass.area to 
set to null() all the values below a specified size. Then run 
r.fill.nulls to fill these areas from surrounding values. Or you can 
use the map calculator or r.nulls to set the nulls to a specified 
value.

After conversion to vector, you can use v.to.db to add an area field to 
your vector attribute table and use this to filter all areas below or 
above a set value.

Michael



_____________________________
C. Michael Barton, Professor & Curator
School of Human Origins, Cultures, & Societies
Arizona State University
Tempe, AZ  85287-2402

WWW - http://www.public.asu.edu/~cmbarton
Phone: 480-965-6262
Fax: 480-965-7671




More information about the grass-dev mailing list