I have a selection in vector point. I would like to do random sample from it. I am using qgis to do it.
Here is my selection code:
selection=layers_canvas.getFeatures(QgsFeatureRequest().setFilterExpression(u'"fitofissio" ILIKE \'%Vereda%\'')) layers_canvas.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.