[Qgis-developer] Remove Feature
Alexandre Badez
alexandre.badez at gmail.com
Fri Mar 2 04:27:13 EST 2012
THANKS !!!!
IT WORKS ! \o/
On Fri, Mar 2, 2012 at 10:25, Martin Dobias <wonder.sk at gmail.com> wrote:
> 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
--
Alex
More information about the Qgis-developer
mailing list