Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- layer = qgis.utils.iface.activeLayer()
- initial_features = []
- new_features = []
- # Get initial count of features
- for feat in layer.getFeatures():
- initial_features.append(len([feat]))
- print sum(initial_features), "initial features"
- # After creating features, use following to subtract new count of features with initial count
- for feat in layer.getFeatures():
- new_features.append(len([feat]))
- print sum(new_features) - sum(initial_features), "new features"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement