<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 28, 2019 at 8:49 AM Sandro Santilli <<a href="mailto:strk@kbt.io">strk@kbt.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Mar 28, 2019 at 07:59:05AM -0700, Martin Davis wrote:<br>
> CoordinateSequence::removeRepeatedPoints does NOT do what you want - it<br>
> only removes consecutive points which have *identical* values.<br>
> <br>
> You can probably use the DP Simplifier to remove redundant point along<br>
> straight lines by calling it with a very small distance tolerance.  This<br>
> will be a bit brittle however - if there happen to be points along the<br>
> square edges which are within that tolerance of a corner then the corner<br>
> point might get removed instead.  (For non-rectilinear geometry this<br>
> doesn't really matter, but of course for a rectangle it will make it<br>
> slightly non-rectilinear)<br>
<br>
That possibility only exists with a tolerance != 0, doesn't it ?<br></blockquote><div><br></div><div>Yes.  Your suggestion of using tolerance = 0 is defnitely the better way to handle this.   </div></div></div>