mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
minor script fixes
This commit is contained in:
parent
394b4f1a87
commit
a70e73cd74
@ -21,11 +21,9 @@ total = 100.0 / len(features)
|
||||
|
||||
for count, f in enumerate(features):
|
||||
outputFeature = f
|
||||
if f.geometry():
|
||||
if f.hasGeometry():
|
||||
outputGeometry = f.geometry().centroid()
|
||||
outputFeature.setGeometry(outputGeometry)
|
||||
|
||||
writer.addFeature(outputFeature)
|
||||
feedback.setProgress(int(count * total))
|
||||
|
||||
del writer
|
||||
|
Loading…
x
Reference in New Issue
Block a user