[postgis-devel] ST_Simplify vs ST_SimplifyVW

Sandro Santilli strk at keybit.net
Wed Jun 3 12:43:54 PDT 2015


On Wed, Jun 03, 2015 at 09:19:44PM +0200, Nicklas Avén wrote:

> 1)
> When using ST_Simplify, points is removed also when used with 0 as
> tolerance if they doesn't affect the line. In ST_SimplifyVW those points
> isn't removed. The reason is that it is the same function as
> ST_SetEffectiveArea. And in htat context it would be wrong to remove any
> points. That is not the purpose of the function. 
> My question here is:
> Is that difference acceptable or should I put some effort in
> differentiate the behavior when called from ST_SimplifyVW from when
> called from ST_SetEffectiveArea?

You're saying that you use "0" to mean "do not run the simplification step" ?
How about using a negative value for that, instead  ?

> 2)
> This is just a question about how to describe in the doc about the
> difference. Since Visvalingam-Whyatt algorithm only compares area in
> triangels, it is possible to treat geoemtries in 3d-space the same way
> as geoemtries in 2d-space. The triangel is only 2d any way, just
> rotated. The result is a function that is sensitive also to significans
> in third dimension. This gives a difference in behavior that I want help
> to describe in a good way. And should it be described both in
> ST_Simplify and ST_SimplifyVW or only in ST_SimplifyVW?

You can say that ST_SimplifyVW considers Z values, if present, in the
determination of the importance of each vertex, while ST_Simplify does
not.

Describing it in both, with cross-references, would be nice.
(more docs are always good)

I'm intentionally staying away from point 3 ("Simplification" chapter of
manual).

--strk;



More information about the postgis-devel mailing list