[GRASS-dev] removing small multiple polygons created by r.stream.basin + r.to.vect

Margherita Di Leo dileomargherita at gmail.com
Mon Apr 9 12:43:59 EDT 2012


On Mon, Apr 9, 2012 at 5:54 PM, Markus Neteler <neteler at osgeo.org> wrote:

> On Mon, Apr 9, 2012 at 4:25 PM, Margherita Di Leo
> <dileomargherita at gmail.com> wrote:
> > Ciao Markus,
> >
> > On Mon, Apr 9, 2012 at 3:47 PM, Markus Neteler <neteler at osgeo.org>
> wrote:
> >>
> >> Wouldn't it be better to remove them with v.clean and rmarea to avoid
> >> holes?
> >
> >
> > just tried with:
> >
> >
> >         grass.run_command('v.clean', input = v_basins,
> >                                      output = v_basin,
> >                                      type = 'area',
> >                                      tool = 'rmarea',
> >                                      thresh = 1,     # I also tried 10
> >                                      overwrite = True)
> >
> > Maybe I do something wrong, but this way I can't get rid of small
> polygons,
>
> what is exactly happening? Nothing or some are removed?
>

In this case, nothing is removed. I'll give it some more try..

>
> > and, in addiction, I need to set the threshold parameter, which I'm not
> sure
> > to be suitable for all cases...
>
> I wanted to suggest to run quartile statistics (extended stats in
> v.univar) on
> an "area" column (if needed, add with v.to.db). But I realized that it only
> supports extended statistics on point data :( No idea why this
> limitation...
> So I thought to suggest the 1st quartile as threshold.
>

Thanks, I'll work on this idea.

>
> Maybe someone else has an idea?
>
> Markus
>



-- 
Ing. Margherita Di Leo, Ph.D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20120409/9670818f/attachment.html


More information about the grass-dev mailing list