-2

To better explain my issue, I have posted 2 photos, my problem is highlighted with yellow and I want to get from picture 1 to picture 2.

If you look closely, in the first photo, the number of the attribute table rows does not matches the id numbers and I do not know how to make the first row number to start from zero! I should do an assignment and I need the rows to match ID and I need them to start from zero.

Therefore, I want to know how to make attribute table's rows to start from number 0 instead on 1?

It is an assignment that has clearly stated that we need to match the id's numbers and the rows numbers in the pdf that professor has gave us, i.e. the second picture, he has managed to start from zero both in row number and id. I asked my question here because I don't know what should I do to fix this and I didn't manage to find it in google.

enter image description here

enter image description here

enter image description here

enter image description here

Arbo94
  • 153
  • 1
  • 8
  • 2
    Why do you need the row numbers to match the IDs? What happens if there are gaps in your IDs? Easiest way would be to delete the record 0 and recreate it at 19 or whatever the next available ID is. – Midavalo May 13 '17 at 23:51
  • the row numbering you mean is an internal count in QGIS that you should not be able to alter (also, it has no relation to the attributes themselves). if your assignement requires you to match the attributes ID field to the internal row count, you will need to change the ID field instead. however, AFAIK the internal row count's starting number did actually change from 0 to 1 in QGIS 2.16. and above... – geozelot May 14 '17 at 11:43
  • 1
    Please do not comment on your own question. Comments are used to request clarifications. It's not fair to those who would answer to need to mine the comments for critical information. Please [Edit] the question to clarify your goal, and what you have tried. As a new user, please take the [Tour]. – Vince May 14 '17 at 11:50
  • @Arbo94 Please confirm that your pictures are from your Professor's PDF? – Midavalo May 14 '17 at 14:13
  • @Midavalo I added to photo to confirm the PDF. But why? – Arbo94 May 15 '17 at 15:53
  • @Arbo94 I don't believe your Professor is asking you to modify the QGIS gui to show the table from 0. To me it sounds like you are being asked to number the actual records from 0. You may like to clarify this question with the professor before you go ahead to modify your GUI (not easy, and not at all a normal activity). – Midavalo May 16 '17 at 01:19

1 Answers1

1

Considering the comment by ThingumaBob your best bet would be to install a QGIS version prior to 2.16.

However, I doubt this would be your professors intention and I reckon you should just match the two. Try setting the id field to $rownum. See: Filling column with consecutive numbers in QGIS?

Pepijn
  • 171
  • 5