<div dir="ltr">That's a python plugin (ftools), so it may not be available to everyone. <div><br></div><div>Better to do it natively (in the data provider) doing something like <span style="color:rgb(0,0,0);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px;background-color:rgb(251,252,253)"> </span>OGR_DS_ExecuteSQL("<span style="color:rgb(0,0,0)">CREATE SPATIAL INDEX ON tablename [DEPTH N]</span>") - untested</div>
<div><br></div><div>I think it's a great idea to do this automatically with large ogr data sources</div><div><br></div><div>as you said you should probably ask the gdal-dev list about which drivers support spatial index creation an automatic update.</div>
<div><br></div><div>cheers</div><div>Etienne</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 27, 2014 at 7:51 AM, kimaidou <span dir="ltr"><<a href="mailto:kimaidou@gmail.com" target="_blank">kimaidou@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi<br><div><div class="gmail_extra"><br><div class="gmail_quote">2014-02-27 11:14 GMT+01:00 Andrea Peri <span dir="ltr"><<a href="mailto:aperi2007@gmail.com" target="_blank">aperi2007@gmail.com</a>></span>:<div class="">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>I guess more better is to use this extremely simple batch and create all the index in one step only.<br>sing the gdal/ogr from osgeo4w.<br>

<br><a href="http://trac.osgeo.org/gdal/wiki/BatchCreationIndexesForShapefilesOnDOS" target="_blank">http://trac.osgeo.org/gdal/wiki/BatchCreationIndexesForShapefilesOnDOS</a><br>
<br></div>Regards,<br></div><br></blockquote><div><br><br></div></div><div> As I said, I am thinking of non power users. They surely won't create nor use such a batch file, even if it is simple. I know there is also the great tool Vector / Data management tools / Create Spatial Index, which can create one for all layers in one step. But users do not use it : they do no know it exists, or they know but forget to use it.<br>

</div></div><br></div></div></div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br></div>