I need to change the id (feature.id() in the python API or $id in the field calculator) of for features in shapefile layers in qgis, and I need to do it in Python. Is there a way?
I tried something like what was suggested in the post How to change attributes with QGIS python? , but it did not work, because apparently id is not a field.
In any case, is there a way of changing it? If not, is there a way to create a geographic feature and specify its id?