Bug report #14411

When copying a shapefile with right-click "save as" it turns integer-type to string-type

Added by Ralf Deuerling over 8 years ago. Updated over 8 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:
Crashes QGIS or corrupts data:No Copied to github as #:22392

Description

I tried to copy shapefiles with several integer- and real-type columns with the right-click-menu "save as..." and it turned out, that the resulting new shapefile gets all interger-types formatted into string-types. As far as I tried, this only happens to former integer-types. Real-types are correctly copied to real.

The layer attributes of the origin shapefile say, that the integers have the type "qlonglong" and the typename "Integer64". Those are formatted into type "QString" with typename "String" when copying the shapefile.


Related issues

Related to QGIS Application - Bug report #14546: Reads Long Integers/integer64 Fields As Strings In Shapef... Closed 2016-03-22

Associated revisions

Revision 7de0757f
Added by Matthias Kuhn over 8 years ago

GDAL 2.0 allows writing 64bit longlong integers

Fix #14411

Revision e135699a
Added by Matthias Kuhn over 8 years ago

GDAL 2.0 allows writing 64bit longlong integers

Fix #14411

History

#1 Updated by Anita Graser over 8 years ago

  • Affected QGIS version changed from 2.14.0 to master
  • Priority changed from Normal to High
  • Category set to Vectors

I can confirm. To reproduce, use for example lakes.shp from the QGIS sample data: the cat column will change from Int to String when using save as ...

#2 Updated by Anita Graser over 8 years ago

Note: only happens with Integer64 but not with Integer types (as displayed in the layer properties | fields)

#3 Updated by Anonymous over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF