Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#828 closed bug (duplicate)

Features cannot be cut or deleted when using shapefile data.

Reported by: gburns Owned by: nobody
Priority: critical: causes crash or data corruption Milestone:
Component: Digitising Version: Trunk
Keywords: cut features, delete Cc: cdavilam@…
Must Fix for Release: No Platform: OS X
Platform Version: 10.4.10 Awaiting user input: no

Description

Features cannot be cut or deleted when using shapefile data. Other data types have not been tested.
If you try to delete a feature (by Toggle Editing, Select Features, drawing a small box around the feature to select it, Cut Features, Toggle Editing), the feature will disappear from the screen, but QGIS also deletes something it shouldn’t – the dbf file. If you then close the map and reopen it, the feature will reappear. If you try and delete the feature a second time, QGIS will crash.

Change History (3)

comment:1 by gburns, 16 years ago

I'm new to QGIS so take everything I say with a grain of salt. However, after a dozen hours of testing why a basic function like Cut Features was not working, this is what I discovered. I may be wrong in my explanation, or I may be doing something incorrect.

  1. I have an external firewire drive on which I have OSX. Call it A-Drive. I have a shapefile folder called TEST on this drive in which there is a file called TEST.dbf. This file, and the other three files in the folder (.shp, .prj, .shx) define five points.
  1. I have another external firewire drive, called B-drive, to which I installed QGIS. So, I have a QGIS data file on one drive, and QGIS itself on another.
  1. I opened QGIS and added the TEST layer. Five points appeared.
  1. I deleted one of the points and it disappeared.
  1. I saved the project on A-Drive, shut down QGIS, opened the project again. This is what happened:
  • the deleted point was still there
  • the TEST.dbf file was gone (only three files now in the TEST folder)
  • all the attributes for the five points had gone
  • a new file called TEST_packed.dbf appeared on B-drive (in the same directory as QGIS).
  1. When I tried to cut the point that had reappeared a second time, QGIS crashed.
  1. I reversed everything, thinking that maybe QGIS has to be in the Applications folder. I installed QGIS into the Applications folder on A-Drive and created a new TEST folder on B-Drive. I went through the same procedure as above. Once again, a new file called TEST_packed.dbf was created, but this time in the Applications folder (where QGIS now resided), and TEST.dbf was deleted from the TEST folder on B-Drive.
  1. To confirm that Delete and Cut Features only work if QGIS and it's data are on the same drive, I put both on A-Drive, and then both on B-Drive. Everything worked.
  1. I still wasn't convinced that such a basic flaw would exist with QGIS, so I reinstalled OSX onto my internal drive, reinstalled QGIS from the zip file, and the same thing happened.

My explanation is this: when I cut the point and saved it, QGIS expected the data it was working with (TEST folder) to be on the same drive. When it couldn't find the TEST folder to update the shapefiles, for some reason QGIS saved a thing called TEST_packed.dbf in the same directory (or folder) as itself, and deleted the original dbf file.

To sum up:

If QGIS and your data are on the same drive: Cut Features and Delete work correctly. If QGIS and your data are on the different drives: Cut Features and Delete do not work.

I consider that some warning be given in the READ ME file that comes with QGIS, along the lines of: "QGIS and your data must be on the same drive, otherwise some features won't work".

comment:2 by cdavila, 16 years ago

Cc: cdavilam@… added
Milestone: Version 0.9.1
Priority: majorcritical
Resolution: duplicate
Status: newclosed
Type: defectbug

Same as #785, although much better explained here

comment:3 by (none), 15 years ago

Milestone: Version 0.9.1

Milestone Version 0.9.1 deleted

Note: See TracTickets for help on using tickets.