vertex simplification

Tamas Szekeres szekerest at GMAIL.COM
Sat Oct 27 16:29:02 EDT 2007


I think this kind of feature preprocessing task should not be bound
tightly to the rendering process and should be treated differently.
The concept around MS-RFC-22 ( ) is a kind of
preliminary invocation for satisfying this need.
We should also allow the user to define the desired processing
pipeline along with some caching to prevent from doing the same
operation twice in the further drawings or among the layers if
The concept out there would also allow to drag in the capabilities of
the GEOS library to make more functions available like the
Douglas-Peuker simplifier as it happens.

In many cases however it might be desirable to make the simplification
at the data source to decrease the amount of data to be retrieved.

Best regards,


2007/10/27, thomas bonfort <thomas.bonfort at>:
> 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
> 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

More information about the mapserver-dev mailing list