I'm a totally beginner with QGIS and maybe I have a very easy problem, but I can't help myself. I got an elevation shapefile with classes of elevations like that: 1-100m, 101-200m, ... When I try to classify this dates to display them with a continuous shift of colours, QGIS always sorts the classes like that: 1-100m, 1001-1101m, 101-200m, 1101-1200m, ... So the colours of the elevation classes are mixed and don't display the continuous shift. Is there an easy way to sort the classes in the attribut table in the right way? Thanks a lot!


The attribute table entries you quoted are strings. These can only be sorted alphabetically.

You have to create numerical values from them in a new column of type integer or real using the field calculator with something like

 left(  "elevation" , strpos(  "elevation" ,'-'))
  • Okay, sounds easy... But what du I have to do in the field calculator? Create a new column and then? How can I transform the large amount of dates to numerical entries? I never used it before... So many questions, I'm sorry... – Irka Feb 24 '14 at 10:35

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.