[Qgis-user] row() and col() problem

Jarosław Jasiewicz jarekj at amu.edu.pl
Tue Jun 23 00:29:47 PDT 2009


Hi

I try to generate map where every cell will have unique value
I do that with following mapcalc formula:

map=(row()*451)+col()

where 451 is the total number of columns + 1

I expected following solution;

452,453,454,455,....
953,954,955,956,....
.....

But I recived:

452,452,453,454,454,....
452,452,453,454,454,....
953,954,955,956,....
953,954,955,956,....
....

Where is the error in formula (or it is rounding problem)?

Regards
Jarek



More information about the Qgis-user mailing list