I have a selection in vector point. I would like to do random sample from it.
Here is my selection code:
selection=layers_canvas[0].getFeatures(QgsFeatureRequest().setFilterExpression(u'"fitofissio" ILIKE \'%Vereda%\''))layers_canvas[0].setSelectedFeatures([s.id() for s in selection])I don't know how to do it. The result of select is on class and it isn't able to use ramdom.sample in it. I tried to do my random sample with this function.
أكثر...
Here is my selection code:
selection=layers_canvas[0].getFeatures(QgsFeatureRequest().setFilterExpression(u'"fitofissio" ILIKE \'%Vereda%\''))layers_canvas[0].setSelectedFeatures([s.id() for s in selection])I don't know how to do it. The result of select is on class and it isn't able to use ramdom.sample in it. I tried to do my random sample with this function.
أكثر...