Bug report #6083

Corrupt datastore upon edit

Added by Dieter De Paepe over 11 years ago. Updated about 11 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:Yes Copied to github as #:15437

Description

When editing a shapefile containing edges, the resulting datastore cannot be read completely by the Geotools java library.

I have included a 3 shapefiles.
  1. original.shp: my original file, containing 31 line features.
  2. corrupt.shp: the original file after editing one of the lines so that it contains an additional intermediary point.
  3. corrupt resaved.shp: the corrupt file, saved using the "save as" dialog.

When using the GeoTools library to count the number of features in each of the shapefiles, the corrupt.shp will have only 21 features while the other 2 files report 31 features. A logging error will also be shown when reading the corrupt.shp file.

I have included my java class that shows this error.

I am using Geotools 2.6.6, and have tested this using QGis 1.7.0, 1.7.4 and 1.8.0.

bug.zip (12.5 KB) Dieter De Paepe, 2012-07-23 06:21 AM

case2.zip (136 KB) Dieter De Paepe, 2013-02-14 03:16 AM

History

#1 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#2 Updated by Giovanni Manghi over 11 years ago

  • Status changed from Open to Feedback

What about resaving the shape with OGR? It does produce a valid or invalid shapefile?

#3 Updated by Dieter De Paepe over 11 years ago

I am unsure if the "Feedback" status relates to me or not...
In any case, I do not have an environment set up to test whether or not it works with OGR.

#4 Updated by Giovanni Manghi about 11 years ago

Dieter De Paepe wrote:

I am unsure if the "Feedback" status relates to me or not...

yes to you

In any case, I do not have an environment set up to test whether or not it works with OGR.

if you have qgis installed you have also ogr installed, so you can test.

please leave feedback.

#5 Updated by Giovanni Manghi about 11 years ago

  • Status changed from Feedback to Closed
  • Resolution set to worksforme

I tried to edit in many ways your "original" vector and in no case I had a corruption. I'll close this as it seems a local issue, anyway if you have the exact procedure on how to replicate the issue, please describe it and reopen the ticket.

#6 Updated by Dieter De Paepe about 11 years ago

The problem I described was probably caused by the GeoTools library instead of QGis. (http://jira.codehaus.org/browse/GEOT-3226)

Also available in: Atom PDF