I started studying the examples provided in the "QGIS Python Programming cookbook".
I downloaded the point vector layer as example from https://code.google.com/archive/p/geospatialpython/downloads?page=2 and uploaded in QGIS.
The code below should append a point to the existing points of the vector layer:
vectorLyr = QgsVectorLayer('/qgis_data/nyc/NYC_MUSEUMS_GEO.shp', 'Museums', "ogr") vpr = vectorLyr.dataProvider() pnt = QgsGeometry.fromPoint(QgsPoint(-74.80,40.549)) f = QgsFeature() f.setGeometry(pnt) vpr.addFeatures([f]) vectorLyr.updateExtents()
But, at the end, any new points has been added. May you help me?