[postgis-devel] Visvalingam’s simplification and twkb with zoom-levels

Sandro Santilli strk at keybit.net
Fri Jan 9 11:17:14 PST 2015


Happy new year Nicklas,

On Fri, Jan 09, 2015 at 12:14:01AM +0100, Nicklas Avén wrote:

> I have written a function for simplification with Visvalingam’s algorithm

Are you aware of this ticket ?
http://trac.osgeo.org/postgis/ticket/2227

> The function stores the effective area of each vertex-point in the
> m-value. There is also a second parameter in the function so it is
> possible to set a limit what minimum effective area that the resulting
> geometry vertex points shall have.

[...]

> The speed seems to be about the same as ST_Simplify.

I'd expect it to be faster than D&P in the worst case
(tolerance so low that nothing gets removed).

> So, do we want ST_SetEffectiveArea(geom) and ST_SetEffectiveArea(geom,
> trhld)?

>From my earlier reading of the paper I understood that the
"effective area" of a vertex may change if any adjacent vertex
is removed, as the area of the new triangle is computed and used
if larger than the old triangle. Is this done by your function taking
a threashold already ?

My idea was to have one function to just set the index and another
to filter based on a condition (for example, M value being above
a value). The filtering function sounds pretty generic, and maybe
we already have something for that.

Another thought is that existing clients might not know how to receive
the M ordinate, in which case it's useful to be able to specify which
ordinate should hold the "resolution info".

What such "resolution info" is composed of (effective area or some
derivative info such as "zoom level"?) I'm still not sure about.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list