Created
September 30, 2021 13:49
-
-
Save CEZERT/59f69acd556f97d169fd10073807f37e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layer = iface.activeLayer() | |
features = layer.getFeatures() | |
newFeature = QgsFeature(layer.fields()) | |
newFeature["ID_POINT_D"]=20084 | |
pt = QgsGeometry().fromPointXY(QgsPointXY(2.272507912597,51.020400936747)) | |
newFeature.setGeometry(pt) | |
layer.startEditing() | |
layer.addFeature(newFeature) | |
''' | |
layer.commitChanges() | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment