Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a trimmed/clipped map of Europe, the Middle East and North Africa in QGIS 1.7.3 by deleting all the other countries from a world map shapefile. I would like to permanently rearrange the countries that are left in the shapefile in a particular sequence in the attribute table. I searched for other similar questions on this website and one answer suggested that the .dbf file be modified using a spreadsheet program, e.g., MS Excel 2003. I tried doing that and it seemed to work; but then I realized that when I pointed at Austria in the shapefile, the name that came up was Egypt. Hence, on the map itself, the names of the countries are all mixed up now.

Can you please suggest a way to arrange the countries in the attribute table according to a specific sequence without its affecting the countries on the map itself?

Thank you.

share|improve this question
up vote 3 down vote accepted

MMQGIS Sort should cover that:

Never change the order of lines in a Shapefile's DBF. Can you provide the link to the answer which made you think that that's a good idea?

share|improve this answer
Thank you for your help. Actually, I misinterpreted that answer. It was about adding new columns and attribute data and I thought maybe I could change the line order as well. I hope any other new user will avoid doing that after reading my question :-) – Usman Apr 18 '13 at 18:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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