Bug report #1572

new features will not display before spatial index is recreated/QGIS restarted

Added by paull - over 15 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:Vectors
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11632

Description

I've imported some shapefile-exports (Geomedia) and added line-features in QGIS. The lines were showing up nicely, until I hit "Toggle editing" and "save". After saving, the features immediately disappeared. I saved everything, restarted QGIS, still not there. (Features were showing up in the table though). I restarted QGIS again, still no sign. I've tried theo whole thing again, drawing new features, and again: as soon as I saved the edits, they would disappear. I hit "create spatial index" and boom: immediately all those features get displayed.

shapefiles.zip - Shapefiles (54 KB) paull -, 2009-03-13 08:30 AM

History

#1 Updated by Borys Jurgiel over 15 years ago

I confirm. I observed the same issue several times.

#2 Updated by Maciej Sieczka - over 15 years ago

I noticed a similar thing on Windows couple of versions ago.

#3 Updated by paull - over 15 years ago

same thing happens again today, after a restart, with the same layers. Newly added features will only show up after (re-)creating the spatial index.

#4 Updated by paull - over 15 years ago

Theres a second funny thing that I think is related to this bug.

- Layer A and Layer B both use the same shape-file to display features of that shape-file (in my case: Points)

- I add points (working with Layer A); The new points are being drawn on the map in Layer A; They disappear as soon as I save the changes to the shapefile and reappear as soon as I rebuild the index (see description above). However: The new points never appear on Layer B throughout the process, even though this layer references the same Shapefile as Layer A.

- It takes a complete Restart of QGIS to have Layer B display the newly added points as well. Zooming, panning, disabling and reenabling all doesn't work; the only way to force Layer B to refresh seems to be a restart of QGIS.

#5 Updated by Giovanni Manghi over 15 years ago

Confirmed on Qgis 1.2 from trunk on Ubuntu 9.04. Pushing the milestone to 1.2

#6 Updated by Marco Hugentobler over 15 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Fixed in e00cfa7b (SVN r11226). The spatial index is now recreated if geometry changes are commited. Note that there is work in progress in the OGR library related to a more efficient update of the spatial index.

Also available in: Atom PDF