<div dir="ltr"><div><div><div><div>Thanks Even,that's great solution.<br></div><br>Now, although ST_IsValid() doesn't report any more problems, QGIS "Check geometry validity" still finds issues on 3 features.<br><br></div>I also tried ArcMap's "Check Geometry" function, and it found 2 "self intersections". Features reported by QGIS and ArcMap are different.<br><br></div>This is just terrible file to work on, that's why I didn't want to touch or edit anything inside. And now this validity tools all report issues on different features...<br><br><br></div>Cheers<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 6, 2014 at 2:43 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
><br>
> Interestingly table reprojected with ogr2ogr shows errors on different<br>
> features then errors generated by PostGIS's ST_Transform() function.<br>
<br>
</span>This is a bit surprising. ogr2ogr applies reprojection on each point of source<br>
geometries. I would have expected ST_Transform() to do the same.<br>
<span class=""><br>
><br>
> I wonder if there are some steps I can take before re-projecting or<br>
> afterward, that will produce valid transformation, without need of<br>
> correcting erroneous geometries by hand after re-projecting data?<br>
<br>
</span>Not sure if this qualified of a by hand correction, but you may want to try<br>
ST_MakeValid() after ST_Transform() :<br>
<a href="http://postgis.org/docs/ST_MakeValid.html" target="_blank">http://postgis.org/docs/ST_MakeValid.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Even<br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><br>
</font></span></blockquote></div><br></div>