Sandro,<div><br></div><div>Yes,some sort of MakeValid function would be nice to have in JTS/GEOS.  I actually have some code already for fixing polygons, but it&#39;s not production-ready.  I don&#39;t have any timeline for doing this work - no funding, for one thing!  And lots of other stuff lined up before it.</div>
<div><br></div><div>As for functionality, that&#39;s a good point about not being able to fix 1-point linestrings and non-closed rings.  So this would have to remain on the boundary of JTS/GEOS - such as in the PostGIS MakeValid routine.</div>
<div><br></div><div>The main focus of the work for me would be to make an efficient, robust way of creating valid polygons from bad data. </div><div><br></div><div>Martin</div><div><br></div><div><br><br><div class="gmail_quote">
On Wed, Sep 28, 2011 at 8:15 AM, Sandro Santilli <span dir="ltr">&lt;<a href="mailto:strk@keybit.net">strk@keybit.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Martin, I&#39;ve heard you&#39;ve been considering adding a MakeValid-like<br>
routine to JTS. When asked to port it from postgis to GEOS I&#39;ve been<br>
recluctant to avoid diverging too much from JTS, so I&#39;m interested<br>
in knowing if you really plan to do that and how.<br>
<br>
In particular the PostGIS MakeValid attempts to also fix 1-point<br>
lines and non-closed polygon rings, which would be impossible in<br>
GEOS/JTS due to early catch of such malformities. I&#39;m concerned<br>
that allowing those constructions would open up a can of worms<br>
all over the codebase being full of assumptions about that level<br>
of validity.<br>
<br>
So, questions in order are:<br>
 1) Are you planning to provide a function capable to fix all the<br>
    cases that the PostGIS MakeValid fixes ?<br>
 2) What is the estimated time by which it would be released ?<br>
<br>
TIA<br>
<br>
--strk;<br>
<br>
  ()   Free GIS &amp; Flash consultant/developer<br>
  /\   <a href="http://strk.keybit.net/services.html" target="_blank">http://strk.keybit.net/services.html</a><br>
</blockquote></div><br></div>