[GRASS-user] v.generalize threshold and boyle's algorithm

Markus Metz markus.metz.giswork at googlemail.com
Tue Feb 7 12:00:26 EST 2012

Johannes Radinger wrote:
> Hello,
> after some month a tried an script again which
> calls v.generalize. It seems that this module
> has changed in version 6.4.2 and 6.5SVN.
> Before I could use following:
> grass.run_command("v.generalize",
>                      input = input,
>                      output = "vector_gen",
>                      method = "boyle",
>                      look_ahead = 8,
>                      overwrite = True)
> Now it seems that v.generalize needs a threshold value (required!)
> although the manual states only: Input parameters: input, look_ahead

Right, the module requires threshold, but Boyle (and some other
methods) do not require threshold, instead they require other
parameters. Threshold being required is maybe annoying, but not that
serious, more serious is that the module does not check if all
parameters for the selected method are specified.
> I am confused now if this value is really necessary for calculating boyle's algorithm and if yes how should a value be choosen?

Threshold is not used by boyle, just give the module some dummy value.
> Moreover I'd like to know what means the 'r' flag (backwards compatibility), were there any major changes in recent time (last year)?

A number of bugs were fixed because v.generalize produced corrupt
output in 6.4.1 (see e.g. recent ml thread [1]).

Markus M

[1] http://lists.osgeo.org/pipermail/grass-user/2012-January/063327.html

More information about the grass-user mailing list