[Qgis-developer] Python: How to allow for more results using QgsSnapper.snapMapPoint(...)
Martin Dobias
wonder.sk at gmail.com
Wed Aug 17 22:31:30 PDT 2016
On Fri, Aug 12, 2016 at 2:26 PM, Casper Børgesen (CABO) <CABO at niras.dk> wrote:
>
> Since I cannot remember all the syntaxes and ways to do stuff I found this page, which I have found so many times now:
>
> http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html
>
> The page suggest that you go through the data provider. Perhaps that is not the best way to go anymore, or does it depend on what you want to do?
The page is somehow outdated... You can go directly through data
provider, it is the most efficient way, but probably most often you
want to do the updates to vector layers through QgsVectorLayer methods
because these will notify other parts of the code about the changes,
and they are integrated with undo/redo functionality, so you as a
developer (or user in GUI) can roll back any pending changes until
they are committed (that's the point when data provider's method are
called internally).
Cheers
Martin
More information about the Qgis-developer
mailing list