[Qgis-user] use rownum operator with field calculator

Jürgen E. Fischer jef at norbit.de
Wed Aug 3 02:41:40 PDT 2011


Hi Otto,

On Wed, 03. Aug 2011 at 11:27:12 +0200, Otto Dassau wrote:
> is it possible to automatically add a rownumber with the field calculator
> based on an existing other column? For example based on an alphabetical
> order in another column ?  

Only if you can come up with an expression that produces the number from the
other value.
 
> And what information does the rownum operator currently use to apply ids?
> Creation order?

The order in which the provider returns the features.  So probably no
particular order.

The field calculator currently iterates the layer independently of the
attribute table and increments the $rownum operator for each processed
feature.


Jürgen

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502




More information about the Qgis-user mailing list