Skip to main content
Tweeted twitter.com/StackGIS/status/1617175274432380932
corrected spelling, removed thanks
Source Link
Kadir Şahbaz
  • 78.6k
  • 57
  • 260
  • 407

myMy frame of reference is:

Does QGIS automatically use spatialite spatial indexes? This explain that QGIS uses QgsSpatiaLiteFeatureIteratorQgsSpatiaLiteFeatureIterator for Spatialite Data Provider

Spatial indexes in GeoPackage files This explain the use of Query that is utilizing r-tree index with sub-query:

Creating Spatial Index for GeoPackage using QGIS

thisThis last one explain that It's possible in QGIS3 to create spatial index for Geopackage. You can click "Create Spatial index" from the Layer Properties Dialog and thatthat's it.

My doubt when reading all this, is what is the current state of the use of spatial index within a geopackage?.

Because I can use the DBmanager to create non-spatial indexes within a geopackage per column, and they are visible inside the DBmanager information window, however when using "Create Spatial index from the Layer Properties" qgisQGIS seems to create the index -very fast by the way-, but the geopackage is not altered with any new table related to the layer.

andAnd I can not see information in the DBmanager that the index was created.

In fact, when creating an index within the geopackage, only the option to create non-spatial indexes is possible, the option to create a spatial index appears gray  / disableddisabled.

whenWhen one creates the index from the properties of the layer, QGIS saves it inside the project but not inside the geopackage? Is this how it works?

Why is it not possible to create spatial indexes for geopackages using the DBmanager?

Thank you very much for the help, I'm just trying to understand the operation of the gpkg within QGIS

use QGIS 3.2.3 
Data: geopackage with 2 tables 
table to nonspatial: 4 million records 
spatial b table: polygons approx 40k elements

my frame of reference is:

Does QGIS automatically use spatialite spatial indexes? This explain that QGIS uses QgsSpatiaLiteFeatureIterator for Spatialite Data Provider

Spatial indexes in GeoPackage files This explain the use of Query that is utilizing r-tree index with sub-query:

Creating Spatial Index for GeoPackage using QGIS

this last one explain that It's possible in QGIS3 to create spatial index for Geopackage. You can click "Create Spatial index" from the Layer Properties Dialog and that it.

My doubt when reading all this, is what is the current state of the use of spatial index within a geopackage?.

Because I can use the DBmanager to create non-spatial indexes within a geopackage per column, and they are visible inside the DBmanager information window, however when using "Create Spatial index from the Layer Properties" qgis seems to create the index -very fast by the way-, but the geopackage is not altered with any new table related to the layer.

and I can not see information in the DBmanager that the index was created.

In fact, when creating an index within the geopackage, only the option to create non-spatial indexes is possible, the option to create a spatial index appears gray  / disabled.

when one creates the index from the properties of the layer, QGIS saves it inside the project but not inside the geopackage? Is this how it works?

Why is it not possible to create spatial indexes for geopackages using the DBmanager?

Thank you very much for the help, I'm just trying to understand the operation of the gpkg within QGIS

use QGIS 3.2.3 Data: geopackage with 2 tables table to nonspatial: 4 million records spatial b table: polygons approx 40k elements

My frame of reference is:

Does QGIS automatically use spatialite spatial indexes? This explain that QGIS uses QgsSpatiaLiteFeatureIterator for Spatialite Data Provider

Spatial indexes in GeoPackage files This explain the use of Query that is utilizing r-tree index with sub-query:

Creating Spatial Index for GeoPackage using QGIS

This last one explain that It's possible in QGIS3 to create spatial index for Geopackage. You can click "Create Spatial index" from the Layer Properties Dialog and that's it.

My doubt when reading all this, is what is the current state of the use of spatial index within a geopackage?.

Because I can use the DBmanager to create non-spatial indexes within a geopackage per column, and they are visible inside the DBmanager information window, however when using "Create Spatial index from the Layer Properties" QGIS seems to create the index -very fast by the way-, but the geopackage is not altered with any new table related to the layer.

And I can not see information in the DBmanager that the index was created.

In fact, when creating an index within the geopackage, only the option to create non-spatial indexes is possible, the option to create a spatial index appears gray/disabled.

When one creates the index from the properties of the layer, QGIS saves it inside the project but not inside the geopackage? Is this how it works?

Why is it not possible to create spatial indexes for geopackages using the DBmanager?

I'm just trying to understand the operation of the gpkg within QGIS

use QGIS 3.2.3 
Data: geopackage with 2 tables 
table to nonspatial: 4 million records 
spatial b table: polygons approx 40k elements

Source Link
Eduardo
  • 363
  • 3
  • 10

How does QGIS 3.2.3 handle or create spatial indexes within a geopackage?

my frame of reference is:

Does QGIS automatically use spatialite spatial indexes? This explain that QGIS uses QgsSpatiaLiteFeatureIterator for Spatialite Data Provider

Spatial indexes in GeoPackage files This explain the use of Query that is utilizing r-tree index with sub-query:

Creating Spatial Index for GeoPackage using QGIS

this last one explain that It's possible in QGIS3 to create spatial index for Geopackage. You can click "Create Spatial index" from the Layer Properties Dialog and that it.

My doubt when reading all this, is what is the current state of the use of spatial index within a geopackage?.

Because I can use the DBmanager to create non-spatial indexes within a geopackage per column, and they are visible inside the DBmanager information window, however when using "Create Spatial index from the Layer Properties" qgis seems to create the index -very fast by the way-, but the geopackage is not altered with any new table related to the layer.

and I can not see information in the DBmanager that the index was created.

In fact, when creating an index within the geopackage, only the option to create non-spatial indexes is possible, the option to create a spatial index appears gray / disabled.

when one creates the index from the properties of the layer, QGIS saves it inside the project but not inside the geopackage? Is this how it works?

Why is it not possible to create spatial indexes for geopackages using the DBmanager?

Thank you very much for the help, I'm just trying to understand the operation of the gpkg within QGIS

use QGIS 3.2.3 Data: geopackage with 2 tables table to nonspatial: 4 million records spatial b table: polygons approx 40k elements