[Qgis-developer] Remove Feature
Martin Dobias
wonder.sk at gmail.com
Fri Mar 2 04:25:10 EST 2012
On Fri, Mar 2, 2012 at 10:14 AM, Alexandre Badez
<alexandre.badez at gmail.com> wrote:
> So I try do delete features as this:
> f = core.QgsFeature()
> fids = []
> while dp.nextFeature(f):
> fids.append(f.id())
> logger.debug("deleting feature: %s", fids)
> if not dp.deleteFeatures(fids):
> # handle error
> for e in dp.errors():
> logger.critical(e)
It looks like you have forgotten to tell which features you want from
the provider - use select() method to specify that. (Because the
"fids" list is empty)
Martin
More information about the Qgis-developer
mailing list