vertex simplification

Steve Lime Steve.Lime at DNR.STATE.MN.US
Mon Oct 29 18:39:08 EDT 2007


I think that would be a good idea. Somehow I missed those the first go round. Should
create a bug so we make sure SWIG mapscript gets updated too.

Steve

>>> On 10/29/2007 at 4:26 PM, in message <47265002.6030107 at mapgears.com>,
Julien-Samuel Lacroix <jlacroix at MAPGEARS.COM> wrote:
> Hi,
> 
> Just to say that few months back I added two functions in mapgeos.c to 
> simplify a shape object via mapscript. They used GEOSSimplify and 
> GEOSTopologyPreserveSimplify. Is that something that would be useful for 
> you? I could commit it if you want.
> 
> Julien
> 
> Stephen Woodbridge wrote:
>> thomas bonfort wrote:
>> 
>>> hi all,
>>>
>>> I'm looking into adding some vertex simplification at the image level,
>>> for the time being limited to the agg renderer. I've got two questions
>>> I'd like to have feedback on:
>>>
>>> * it's very easy to add a local simplification, by removing vertexes
>>> in a linestring that are closer than some threshold to their preceding
>>> vertex. I'm getting nice speedups by mimicking what's currently (more
>>> or less implicitely) done with gd, by removing vertexes that fall in
>>> the same pixel than its predecessor (of course these speedups would
>>> only happen for complex line layers. I'm currently testing with the
>>> canadian road data mentionned in
>>> http://wiki.osgeo.org/index.php/FOSS4G2007_IntegrationShowcase). I
>>> know agg is all about subpixel accuracy and such, but I'd think this
>>> behaviour could be enabled by default ( as in this case the maximum
>>> error for a vertex is less than a pixel)
>>>
>>> * is anyone interested in having a global and tunable vertex
>>> simplification functionality. I don't think it would be too much work
>>> work to implement a douglas-peuker line generalisation algorithm, that
>>> could be turned on and tunable with a new mapfile keyword. That's
>>> basically doing what postgis' SIMPLIFY can already do, except this
>>> would be done in pixel coordinates, and therefore would not have to be
>>> tuned w.r.t. scale.
>> 
>> 
>> Thomas,
>> 
>> This sounds like a very cool idea. I think the value in this is that is 
>> speeds things up, so if implementing douglas-peuker does not improve on 
>> what you have already tried, then I'm not sure of the value. I think the 
>> implementing the same for polygons which can have as many or more 
>> vertices as polylines would be a huge win also.
>> 
>> -Steve W
>> 



More information about the mapserver-dev mailing list