2

I downloaded BGT data from https://www.pdok.nl/introductie/-/article/basisregistratie-grootschalige-topografie-bgt- in QGIS 3.24.2-Tisler. I can't clip this data and get a message: 'no spatial index exists for input layer'. Therefore I want to use the Create spatial index tool for the geopackage file. However, the Create Spatial Index tool is not working. What I can do?

enter image description here

4
  • How could I download some data as GeoPackage from that site?
    – user30184
    Aug 2, 2022 at 17:30
  • Go to this website: pdok.nl/introductie/-/article/… , click on 'bekijk in pdok viewer'. after, select an area and download. My surface area was 180,000m2, which is really big. Only if I select a small area I can clip and this data. Though, for my thesis I need a big area (gemeente Breda, case study). Aug 3, 2022 at 6:48
  • I received a zip with a bunch of GML files. I could not find GeoPackage from the format list.
    – user30184
    Aug 3, 2022 at 10:24
  • Sorry, don't understand how you can download an area from the site you indicated. Can you provide a file or a more detailed description how to get the file?
    – Babel
    Nov 29, 2022 at 16:26

1 Answer 1

1

After downloading an alternative gpkg from that site, I ran ogrinfo hasSpatialIndex - The downloaded data reported to have an index, the GUI's inside QGIS reported it had an index and DB Browser showed the presence of the rtree tables. Clipping operation worked fine.

I manually removed the spatial index using ogrinfo DisableSpatialIndex. The Create Spatial Index buttons are now available inside QGIS. A clip Operation worked, however it did report a 'No spatial index exists for input layer, performance will be severely degraded'. Only performance though - It didn't prevent the operation from running.

So I can't replicate the problem in full, however I suspect maybe that the downloaded gpkg does have something wrong with it.

The most simple solution would be to recreate the gpkg layer as a new local gpkg layer, using Export > Save Features As.

This will create a new layer with a new spatial index and will resolve the clipping issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.