<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1484640468191_30914"><span></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_30994">From QGIS 2.14 the postgis server-side simplification uses the ST_RemoveRepeatedPoints method:</div><div id="yui_3_16_0_ym19_1_1484640468191_30995"><br clear="none" id="yui_3_16_0_ym19_1_1484640468191_30996"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_30997"><span id="yui_3_16_0_ym19_1_1484640468191_30998"><a rel="nofollow" shape="rect" target="_blank" href="http://qgis.org/en/site/forusers/visualchangelog214/#feature-use-st-removerepeatedpoints-for-server-side-simplification-with-postgis-2-2-or-newer-layers" style="color: rgb(25, 106, 212);" id="yui_3_16_0_ym19_1_1484640468191_30999">http://qgis.org/en/site/forusers/visualchangelog214/#feature-use-st-removerepeatedpoints-for-server-side-simplification-with-postgis-2-2-or-newer-layers</a><br clear="none" id="yui_3_16_0_ym19_1_1484640468191_31000"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_31001"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_31001">The tolerance depends of current map scale, but you could check results in postgreSQL for different tolerances: 1 ... 10 ...100.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_31001"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_31001">To avoid invalid geometry errors, but simplifying data to maintain rendering performance, you can disable in QGIS the server-side simplification of that layer to only enable the local simplification (The original features are read from postgre and simplification runs when the geometry is rendered. This does not change the original feature).</div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_31001"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_31001"><br></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1484640468191_30924" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1484640468191_30923"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1484640468191_30922"> <div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_30921"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1484640468191_30920"> <hr size="1" id="yui_3_16_0_ym19_1_1484640468191_30919"> <b><span style="font-weight:bold;">De:</span></b> Mark Johnson <mj10777@googlemail.com><br> <b><span style="font-weight: bold;">Para:</span></b> "qgis-developer@lists.osgeo.org" <qgis-developer@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Enviado:</span></b> Martes 17 de enero de 2017 10:25<br> <b><span style="font-weight: bold;">Asunto:</span></b> Re: [Qgis-developer] Valid or invalid geom in PostGIS?<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1484640468191_31296"><br><div id="yiv8769919212"><div dir="ltr" id="yui_3_16_0_ym19_1_1484640468191_31295"><blockquote class="yiv8769919212gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;" id="yui_3_16_0_ym19_1_1484640468191_31301"><pre style="white-space:pre-wrap;color:rgb(0,0,0);" id="yui_3_16_0_ym19_1_1484640468191_31300"><pre style="white-space:pre-wrap;" id="yui_3_16_0_ym19_1_1484640468191_31299">let me be more clear: there are NO invalid geoms in the DB, as reported
by st_isvalid. what is strange:
* invalidities are reported in qgis log (this may be due to
simplification, thanks Alvaro)</pre></pre></blockquote><div id="yui_3_16_0_ym19_1_1484640468191_31298"><br></div><div id="yui_3_16_0_ym19_1_1484640468191_31297">Then attept an 'ST_Simplify(geom,tolerance)' on these geometries to see if these errors occur:</div><div id="yui_3_16_0_ym19_1_1484640468191_31294">- tolerance '1' seems to be the default value being used </div><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><span style="font-size:12.8px;font-family:arial, sans-serif;color:rgb(34,34,34);">> 2017-01-16T11:34:52 1 NOTA: NOTICE: Self-intersection at or near point</span><br></pre><div id="yui_3_16_0_ym19_1_1484640468191_31545"><span style="font-size:12.8px;" id="yui_3_16_0_ym19_1_1484640468191_32675">> 619746.32941695023 4869530.4882389866</span><br style="font-size:12.8px;"><span style="font-size:12.8px;">> 2017-01-16T11:34:52 1 NOTA: NOTICE: IllegalArgumentException: Invalid</span><br style="font-size:12.8px;"><span style="font-size:12.8px;">> number of points in LinearRing found 3 - must be 0 or >= 4</span><br></div><div id="yui_3_16_0_ym19_1_1484640468191_31546"><span style="font-size:12.8px;"><br></span></div><div id="yui_3_16_0_ym19_1_1484640468191_31634"><span style="font-size:12.8px;"><br></span></div></div></div><br>_______________________________________________<br>Qgis-developer mailing list<br><a ymailto="mailto:Qgis-developer@lists.osgeo.org" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" id="yui_3_16_0_ym19_1_1484640468191_31650">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br><br></div> </div> </div> </div></div></body></html>