I have a shapefile that contains 10s of thousands of individual four-sided polygons, so I have 5x that in vertices. I need to be able to update the coordinates of every single vertex based on a new list of vertex coordinates. To clarify, this isn't a reprojection or a simple transform, it's an overwrite of the existing polygon vertex coordinates with a different set of coordinates.
I'd like to be able to extract a list of the vertex coordinates, then perform the edits in the list outside of QGIS, then import it back into the shapefile so that the polygon locations update. Is that possible? Or is there a similar method that might do the same?
As an example, just to describe it visually, it could look something like this for just two polygons (black poly is with the 'current' coordinates, purple poly is with the 'updated' coordinated):
If this is a coding thing, might it work with something like this:
for f in layer.getFeatures():
f.geometry().asPoint().y() = ....
f.geometry().asPoint().x() = ....
Where the .... refers to an external source for the coordinates.