Re: [Qgis-user] QGIS2.8 How are the features ordered when using layer.selectedFeatures()

2019-06-04 Thread Raymond Nijssen
Hi, I found two ways of doing that, I think the second is faster but not sure. (And I think they will both be slower than the random order code you were using before, but the order will remain.) Good luck, Raymond --- layer = iface.activeLayer() ids = layer.selectedFeatureIds()

Re: [Qgis-user] QGIS2.8 How are the features ordered when using layer.selectedFeatures()

2019-06-03 Thread Zhang Qun
Thanks Nyall. Then is there anyway i can get the original order? My data is road lane points and the sequence order represent the driving direction. On Tue, Jun 4, 2019, 11:58 AM Nyall Dawson wrote: > On Tue, 4 Jun 2019 at 13:38, Zhang Qun wrote: > > > > Hi, > > Does anyone know how the

Re: [Qgis-user] QGIS2.8 How are the features ordered when using layer.selectedFeatures()

2019-06-03 Thread Nyall Dawson
On Tue, 4 Jun 2019 at 13:38, Zhang Qun wrote: > > Hi, > Does anyone know how the features are ordered when you extract by > selectedFeatures()? Is it in the same order as the input delimited text file? > I'm asking because sometimes I found the looping does not give me the same > order as in

[Qgis-user] QGIS2.8 How are the features ordered when using layer.selectedFeatures()

2019-06-03 Thread Zhang Qun
Hi, Does anyone know how the features are ordered when you extract by selectedFeatures()? Is it in the same order as the input delimited text file? I'm asking because sometimes I found the looping does not give me the same order as in my data source. selected_features = layer.selectedFeatures()