Skip to main content
2 of 3
Tiny adjustments
Taras
  • 34k
  • 4
  • 73
  • 148

fromPointXY creates a new geometry from a QgsPointXY object which is a tuple with two float coordinates, i.e. "X" and "Y".

So, try the following expression

feat.setGeometry(QgsGeometry.fromPointXY(QgsPointXY(coords[0], coords[1])))
Bera
  • 77.8k
  • 14
  • 78
  • 188