[GRASS-user] v.generalize / reanimation of dead lines ?

Markus Metz markus_metz at gmx.de
Mon Sep 1 09:55:19 EDT 2008


Hi Peter,

as an interim solution you might try an alternative to v.generalize that
I called v.simplify, available here:
http://markus.metz.giswork.googlepages.com/line_simplification.tar.gz
The module works for me so far, but I still discover strange behaviour
now and then. I developed that module specifically for areas, before
v.generalize was available.
Differences to v.generalize are that this module only
simplifies/generalizes lines/boundaries, smoothing is not available, and
only the Douglas-Peucker algorithm is implemented.
The appropriate level of topology is always maintained, centroids are
always kept and never altered. Boundaries are not simplified if this
would result in area deletion or changed centroid attachment. All the
work is done with a temporary vector, and after simplifying the
temporary vector, only alive lines are copied to the final output vector
(no dead lines, smaller file size).  v.simplify can also delete
duplicate points only, i.e. of two adjacent vertices in a line/boundary
with identical coordinates one is removed. This should be done before
simplification in v.simplify.
As far as I understand the source code v.generalize discards all
centroids and builds them anew at the end, area topology is not
maintained during simplification.
This is not meant to be competition for v.generalize, just some ideas on
how to avoid dead lines in the output vector and how to preserve all
areas/centroids, with their original category ID.

Markus
 

Peter Löwe wrote:
> Hi,
>
> I second the "unclean deletion" theory as I encountered this phenomenon before. Also, when generalizing areas which are attached to each other, while the overall "appearance" of the generalized borderlines is ok, more than 50 % of the areas cease to exist, which needs further investigation: Apart from "dead lines" we're dealing with "area mutilation" and "centroid abduction"!
>
> The (topological) truth is somewhere out there,
> Peter
>
>
> -------- Original-Nachricht --------
>   
>> Datum: Fri, 29 Aug 2008 19:17:46 +0300
>> Von: Wolf Bergenheim <wolf+grass at bergenheim.net>
>> An: dylan.beaudette at gmail.com
>> CC: grass-user at lists.osgeo.org, hamish_b at yahoo.com, peter.loewe at gmx.de, Daniel Bundala <bundala at gmail.com>
>> Betreff: Re: [GRASS-user] v.generalize / reanimation of dead lines ?
>>     
>
>   
>> On 29.08.2008 18:54, Dylan Beaudette wrote:
>>     
>>> I have noticed this behavior as well when using v.generalize. I will try
>>>       
>> and 
>>     
>>> dig up the exact situation that caused it-- but I am pretty sure that
>>>       
>> the 
>>     
>>> initial linework was correct = unclean deletion.
>>>
>>>       
>> That is very much possible. This module is still quite young and hasn't
>> gone through a lot of live testing yet. Dylan, I'd be vey interested in
>> this, if you can give me a simple case where it goes wrong.
>>
>> --Wolf
>>
>> Adding Daniel Bundala to the Cc list, as he wrote it last summer.
>>
>> -- 
>>
>> <:3 )---- Wolf Bergenheim ----( 8:>
>>     
>
>   


More information about the grass-user mailing list