Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I m very new to Qgis, so forgive this simple question. Searching in older topics didn t help either.So: I make a new column in my attribute table and it has a default value(for example 0). I want to (probably use the field calculator) and have the result,that row 1 has the value 1, row 2=2 and so on, just like a numbered index. I d be thankful for a code example for the field calculator(including the use of $rownum(I think I need this for switching to the line))

share|improve this question
add comment

1 Answer

up vote 9 down vote accepted

Just put $rownum as the expression. Simple as that. :)

share|improve this answer
    
thanks!:)so simple actually. –  Shepherdjo Jun 19 '12 at 12:31
    
Don't forget to mark it as the accepted answer. –  Nathan W Jun 19 '12 at 12:42
    
Did it. thanks for the hint! –  Shepherdjo Jun 19 '12 at 12:56
add comment

Your Answer

 
discard

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.