Bug report #8135

Saving shp with joined attributes results in wrong column values

Added by Chad Vargas about 6 years ago. Updated about 6 years ago.

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

Description

I joined a shp attribute with a csv attribute. While the two are joined in the cache the number precision in the attribute table is preserved. When I perform a save as to create a shp with the attributes joined permanently, the resulting shp converts the real numbers to integers in the attribute table.

2013_tissue_results.csv Magnifier (2.92 KB) Chad Vargas, 2013-06-22 12:40 PM

2013_tissue_results.csvt (160 Bytes) Chad Vargas, 2013-06-22 12:40 PM

2013_Petiole_Resluts1.dbf (47.2 KB) Chad Vargas, 2013-06-22 12:40 PM

2013_Petiole_Resluts1.prj (143 Bytes) Chad Vargas, 2013-06-22 12:40 PM

2013_Petiole_Resluts1.qpj (257 Bytes) Chad Vargas, 2013-06-22 12:40 PM

2013_Petiole_Resluts1.shp (30.9 KB) Chad Vargas, 2013-06-22 12:40 PM

2013_Petiole_Resluts1.shx (468 Bytes) Chad Vargas, 2013-06-22 12:40 PM

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Feedback

Could you please add sample data to allow me test locally? thanks!

#2 Updated by Giovanni Manghi about 6 years ago

  • Target version set to Version 2.0.0
  • Priority changed from Normal to High
  • Status changed from Feedback to Open
  • Subject changed from Saving shp with joined attributes causes loss of number precision to Saving shp with joined attributes results in wrong column values
  • Operating System deleted (Windows)

From what I see your report is about qgis 1.8.

In QGIS master the things are a little better but still wrong, as the resulting columns have the right number of decimal places, but the values are incorrect.

Anyway it is not a regression, so is not a blocker issue.

#3 Updated by Minoru Akagi about 6 years ago

The width values of real type fields in 2013_tissue_results.csvt are too short. With sufficient values like Real(10.3), you can see untruncated numbers in the output shapefile.

#4 Updated by Giovanni Manghi about 6 years ago

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

Minoru Akagi wrote:

The width values of real type fields in 2013_tissue_results.csvt are too short. With sufficient values like Real(10.3), you can see untruncated numbers in the output shapefile.

then I guess this can be closed as the original issue is fixed in master.

Also available in: Atom PDF