I uploaded a CSV with WKT polygon coordinates. Each polygon was displayed spatially and I re-saved the file as a shapefile.

The problem is most attribute columns are being detected as text, and they should be numeric, integer values. This causes problems when sorting the data.

There are about 100 columns that are incorrectly classified as text.

Is there a way to easily convert all of them to integer?

I am using QGIS 2.18.15.

  • Among attribute fields you have, is there any you want to keep as text? – Kazuhito Jan 13 '18 at 1:14
  • @Kazuhito No, I would prefer all of the attribute fields to be integer. – csft306 Jan 13 '18 at 2:44
  • 1
    Then experts here may suggest scripts to solve this issue efficiently and quickly. I thought I would suggest MMQGIS text to float (it does not give you integer, though). – Kazuhito Jan 13 '18 at 3:25
  • @Kazuhito What does MMQGIS text to float do? – csft306 Jan 13 '18 at 3:35
  • In short, it converts text to floating point number. Please visit MMQGIS website for details. – Kazuhito Jan 13 '18 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.