[GRASS-dev] v.prune with Douglas-Peucker
tutey at o2.pl
Mon May 21 18:47:29 EDT 2007
Markus Metz wrote:
> Maciej Sieczka wrote:
>> Trying to reproduce your problem I run, in spearfish6 location:
>> $ g.region rast=soils -a
>> $ r.to.vect input=soils output=soils_v feature=area
> $ r.to.vect -s input=soils output=soils_vs feature=area
> soils_vs has 30337 duplicate vertices
Please report this as a bug.
> without smoothing corners I also don't get duplicate vertices
>> $ g.region rast=streams -a
>> $ r.thin input=streams output=streams_th
>> $ r.to.vect input=streams_th output=streams_th_v feature=line
> this vector doesn't have any duplicate vertices, neither has
> streams_th_vs created with
> $ r.to.vect -s input=streams_th output=streams_th_vs feature=line
>> but neither yielded doubled vertices. Using GRASS 6.2.2 and 6.3 current
>> CVS. Could you provide an exact procedure to reproduce your problem?
> My main issue was that I wanted to offer a new mehtod for line/boundary
> simplification based on the Douglas-Peucker algorithm. These duplicate
> vertices are not much of a problem, the only increase the size of a
> vector which can become a problem when working on large regions with a
> high resolution.
This *is* a problem I believe. GRASS vector data model is quite memory
consuming already. Any vector module using more memory than needed is a
double problem for this reason actually. Moreover I don't think
r.to.vect -s is supposed to output doubled vertices.
> The real problem is that the old pruning method
> produces funny results and doesn't work in latlon.
I've run into this too. Have you browsed the grass-dev archives?
> Sorry for the long answer!
No problem. Maybe your effort may contribute to the recently started
GRASS Google SOC project dedicated to vector generalisation tools for
GRASS (see recent archives)?
More information about the grass-dev