On Thu, Mar 28, 2019 at 8:49 AM Sandro Santilli <s...@kbt.io> wrote: > 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 ? >
Yes. Your suggestion of using tolerance = 0 is defnitely the better way to handle this.
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel