I'm looking to merge 3 shapefiles and I am changing field names and types to coordinate before the merge process.

I have been able to successfully use the refactor tool to change field types before (integer64 to integer). I am trying to change a string field to an integer, but each time I try to change it the refactored file still has that field as a string. I have also tried to change an integer64 to an integer in this process, and that also is not happening anymore. Changing field names in the refactor process also doesn't work.

Troubleshooting so far - rebooted, tried in QGIS 3.8 (file originally edited in 3.6), and reloading the shapefile layer. No settings were changed in 3.6 that I know of before this started occurring.

UPDATE: Current work around is to create a new field of the desired type then copy information into it. Very time-consuming and would much rather use the Refactor tool if possible.

Sample shapefile: https://drive.google.com/open?id=1U7uu7LHToiX5OwATipDqcZjk9bmeQcLF

The example offending field is i_ZIPCODE.

  • Could you provide small shapefiles for testing?
    – user30184
    Aug 8, 2019 at 20:17
  • Just added a link. Thanks so much!
    – TE_gis
    Aug 9, 2019 at 16:57
  • You can speed up your current workaround a little bit by using the Field Calculator to simultaneously create a new field and copy over the values from the original field.
    – csk
    Aug 9, 2019 at 17:32
  • Works for me with QGIS 3.4.4 and after saving the result as a new shapefile ogrinfo reports the field as i_ZIPCODE: Integer (5.0). I do not have QGIS 3.8 avaiable at the moment.
    – user30184
    Aug 14, 2019 at 13:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.