[QGIS-Developer] Processing: No spatial index exists for input layer, performance will be severely degraded

Andreas Neumann a.neumann at carto.net
Thu Nov 26 07:51:58 PST 2020


Hi all, 

Thanks for your replies/opinions. 

@Richard: this message also comes up for intermediate memory layers, not
only for Geopackage layers. 

@Luigi: if I manually add "create spatial index" often, this very much
"pollutes" the model.  

I agree with Ujaval, that it would be a better user experience if QGIS
would do the indexing automatically (on intermediate layers) for
operations where the input doesn't have an index and the algorithm would
potentially benefit from an index. 

Next to automatic indexing I would think that "auto-repairs" for errors
that processing algorithms introduce would be good to have, e.g. remove
double vertices, remove empty geometries, empty holes/rings,
self-intersections. etc.. If this is potentially dangerous, we can do
opt-in with central threshold values, and only if the analysis is 2d
only. I understand that for 3D analysis automatic cleaning is not always
possible. 

Or maybe a switch to GEOS 3.9 with the "fixed precision model" enabled
would remove all these errors previously introduced by processing? 

Greetings, 

Andreas 

On 2020-11-26 16:24, Ujaval Gandhi wrote:

> +1 to have an option to generate spatial index automatically for intermediate layers. As I understand, creating index for database layers automatically may not be preferable, but it's reasonable to want this for intermediate memory layers. Since processing can already identify which operations might benefit from the index, it would be much better user experience to take care of it internally.
> 
> [1]
> 
> Ujaval Gandhi
> 
> Spatial Thoughts
> 
> mobile: +91-8095684687
> 
> email: ujaval at spatialthoughts.com
> 
> [2]   [3]  
> 
> On Thu, Nov 26, 2020 at 8:26 PM Luigi Pirelli <luipir at gmail.com> wrote: 
> I've this message constantly... but usually when an intermediate layer is used in some geoprocess. So, you can just add a "create spatial index" step before the next geoprocess. Doing it automatically can be time spending. Do you really need it everytime?
> 
> Luigi Pirelli
> 
> **************************************************************************************************
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Book: Mastering QGIS3 - 3rd Edition [4] 
> * Hire a team: http://www.qcooperative.net
> ************************************************************************************************** 
> 
> On Mon, 23 Nov 2020 at 15:23, Andreas Neumann <andreas at qgis.org> wrote: 
> 
> Hi, 
> 
> When running QGIS processing models, I frequently get the red warning messages: 
> 
> No spatial index exists for input layer, performance will be severely degraded 
> 
> These are temporary (intermediate) geopackage files that QGIS generates during the running of the model. Is there an option that QGIS could automatically generate these spatial indexes for intermediate files? 
> 
> Thanks, 
> 
> Andreas 
> 
> --
> Andreas Neumann QGIS.ORG [5] board member (treasurer) _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

 

Links:
------
[1] https://spatialthoughts.com/
[2] https://www.linkedin.com/in/spatialthoughts/
[3] https://twitter.com/spatialthoughts
[4]
https://www.packtpub.com/eu/application-development/mastering-geospatial-development-qgis-3x-third-edition
[5] http://QGIS.ORG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201126/90d2fae4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blocked.gif
Type: image/gif
Size: 118 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201126/90d2fae4/attachment-0001.gif>


More information about the QGIS-Developer mailing list