<div dir="ltr">oups, gmail got rid of the table... Here is a human readable version<br><br>Method used --> vertex number<br><br>"geom" --> 3 763 284 | <br>st_snaptogrid( "geom", 407.618 ) --> 1 220 892<br>st_removerepeatedpoints( "geom", 407.618 ) --> 689 300<br>st_simplify( st_removerepeatedpoints( "geom", 407.618 ), 356.665, true ) --> 303 292<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-01 16:15 GMT+01:00 kimaidou <span dir="ltr"><<a href="mailto:kimaidou@gmail.com" target="_blank">kimaidou@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>New PR update with addition of missing SIP bindings and use of ST_Simplify with third parameter "True" to decrease the size of data to download by QGIS.<br></div>Please help to test with various data and report.<br><br><p>Some quick results, with the same data and query as mentioned in the PR, 
to show how the number of vertexes decreases. It would lead to best 
performance also because the data will be downloaded from the PostGIS 
faster</p>




query
number of vertexes




"geom"
3 763 284


st_snaptogrid( "geom", 407.618 )
1 220 892


st_removerepeatedpoints( "geom", 407.618 )
689 300


st_simplify( st_removerepeatedpoints( "geom", 407.618 ), 356.665, true )
303 292<br><br></div><div>Of course, this is done when viewing the whole layer (zoom to layer extent). For big scales, this PR will not improve so drastically the situation compared to the previous use if ST_SnapToGrid<br></div><div><br></div>Should we not accept the PR so that many more users can try it with master branch ?<br><br></div>Cheers<br></div>Michaël<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-11-27 14:27 GMT+01:00 kimaidou <span dir="ltr"><<a href="mailto:kimaidou@gmail.com" target="_blank">kimaidou@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi all, <br><br></div>I updated my PR.<br></div>I made some quick tests, and it seems this PR can improve speed for PostGIS layers ( with PostGIS 2.2 )<br></div><div>More details in the last comment [1]<br></div><br>Please help to test it with a variety of data types and complexity.<br><br>[1] <a href="https://github.com/qgis/QGIS/pull/2410#issuecomment-160138487" target="_blank">https://github.com/qgis/QGIS/pull/2410#issuecomment-160138487</a><br><br></div>Regards<br></div>Michaël aka "kimaidou"<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-30 11:50 GMT+01:00 kimaidou <span dir="ltr"><<a href="mailto:kimaidou@gmail.com" target="_blank">kimaidou@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi all<br><br></div>Following the blog post written by Paul Ramsey [1], I decided to propose using PostGIS 2.2 ST_RemoveRepeatedPoints function instead of ST_SnapToGrid to do the server side simplification<br><br></div><div>We could also investigate other new features, such as the 3rd parameter for ST_Simplify, but we use St_SimplifyPreserveTopology in QGIS, and I do not think this function has got this new parameter too.<br></div><div><br></div>I made a pull request : see [2]<br></div>Please help me to test and review it <br><div><div><div><br>[1] <a href="http://blog.cartodb.com/smaller-faster/" target="_blank">http://blog.cartodb.com/smaller-faster/</a><br>[2] <a href="https://github.com/qgis/QGIS/pull/2410" target="_blank">https://github.com/qgis/QGIS/pull/2410</a><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>