[geos-devel] Simplify vs removeRepeatedPoints

Sandro Santilli strk at kbt.io
Thu Mar 28 08:49:43 PDT 2019

On Thu, Mar 28, 2019 at 07:59:05AM -0700, Martin Davis wrote:
> CoordinateSequence::removeRepeatedPoints does NOT do what you want - it
> only removes consecutive points which have *identical* values.
> You can probably use the DP Simplifier to remove redundant point along
> straight lines by calling it with a very small distance tolerance.  This
> will be a bit brittle however - if there happen to be points along the
> square edges which are within that tolerance of a corner then the corner
> point might get removed instead.  (For non-rectilinear geometry this
> doesn't really matter, but of course for a rectangle it will make it
> slightly non-rectilinear)

That possibility only exists with a tolerance != 0, doesn't it ?


More information about the geos-devel mailing list