Bug report #10098

Zooming results in parts of features disappearing when spatial indexes SBN/SBX from ESRI are present

Added by Maxim Dubinin over 6 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:2.6.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:18566

Description

1. Add a layer: http://gis-lab.info/forum/download/file.php?id=8744
2. Zoom in once

Before:

After:

QGIS Win7, 32bit, 2e6927f (today nightly)

It seems like there is no such problem under Ubuntu.

History

#1 Updated by Maxim Dubinin over 6 years ago

wrong after link:
http://m-d.me/img/ss/20140421-w30-17kb.jpg

Also, there is no such problem in QGIS 2.1

#2 Updated by Maxim Dubinin over 6 years ago

figured it out.

New QGIS is built agains GDAL 1.10 which now takes into account spatial indexes SBN/SBX from ESRI tribe. Removing those fixes everything.

Still, I think we need to do something about it, either GDAL is incorrectly reading those indices and QGIS should ignore them or something else is going on.

#3 Updated by Eric Brelsford almost 6 years ago

Also seeing this, in QGIS version 2.6 on Ubuntu 14.10. Deleting SBN and SBX fixed it. I see it with all of these files: http://www.nyc.gov/html/dcp/html/bytes/dwn_pluto_mappluto.shtml#mappluto

If I save the layer as a new shapefile in QGIS and open it, it works fine. Presumably because it doesn't create the SBN or SBX files.

#4 Updated by Giovanni Manghi almost 6 years ago

  • Operating System deleted (Windows 7)
  • Affected QGIS version changed from 2.2.0 to 2.6.0
  • OS version deleted (master)
  • Subject changed from Zooming results in parts of features disappearing to Zooming results in parts of features disappearing when spatial indexes SBN/SBX from ESRI are present
  • Status changed from Open to Feedback

this should be closed because seems a gdal issue not a qgis one.

#5 Updated by Jukka Rahkonen almost 6 years ago

Wouldn't it be better to create a GDAL issue and link it here but keep this issue open until it is fixed on GDAL side?

#6 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to up/downstream
  • Status changed from Feedback to Closed

#7 Updated by Andy Harfoot about 5 years ago

  • Status changed from Closed to Reopened

Just adding another observation that may be a particular subset of a wider issue with GDAL's support for SBN / SBX indexes. The GDAL support is read only, so whilst the indexes are used without problems in QGIS in a dataset that is unmodified from the point of export from ArcGIS, as soon as edits are made that alter the order or number of features in the dataset, the ESRI spatial index will not be updated and therefore become corrupt, causing features to disappear when the spatial index is consulted. Building a QIX index fixes this, as does deleting the SBN / SBX files.

This isn't a GDAL issue, GDAL is working as intended, instead QGIS is making incorrect assumptions about GDAL's capabilities.

Tested on Win 7 x64 QGIS 2.8.2 x64 Standalone and 2.10 x64 OSGeo4W

#8 Updated by Andy Harfoot about 5 years ago

According to the comment in GDAL #6042 GDAL should delete ESRI indexes when a shapefile is edited to prevent them from becoming out of sync. Does QGIS use GDAL to edit shapefiles? If so, why is this behaviour not observed?

#9 Updated by Giovanni Manghi over 4 years ago

  • Resolution deleted (up/downstream)

#10 Updated by Giovanni Manghi over 3 years ago

  • Easy fix? set to No
  • Regression? set to No

#11 Updated by Giovanni Manghi over 1 year ago

  • Status changed from Reopened to Closed
  • Resolution set to end of life

Also available in: Atom PDF