Hi, Is there a way to set the snapping settings for a layer via Python? I would like to turn on snapping with a specified tolerance automatically when a user begins editing within a plugin.
There is a question on gis.stackexchange, but it hasn't been answered. http://gis.stackexchange.com/questions/133816/how-to-enable-the-snapping-options-for-vector-layer-using-the-python-programming QSettings stores some values, but these are the defaults: qs = QSettings() qs.value('Qgis/digitizing/default_snap_mode') qs.value('Qgis/digitizing/default_snapping_tolerance') qs.value('Qgis/digitizing/default_snapping_tolerance_units') I have also found the canvas.snappingUtils(), but cannot find functions there to enable snapping modes or set tolerances. Thanks, John John Stevenson Senior Developer [cid:[email protected]]<http://www.thinkwhere.com> t: 01786 476060 (Office) t: 01786 476093 (Direct Dial) w:www.thinkwhere.com<http://www.thinkwhere.com> Glendevon House Castle Business Park Stirling FK9 4TZ [cid:[email protected]]<https://twitter.com/thinkWhere1> [cid:[email protected]] <http://www.linkedin.com/company/1509510?trk=companies_home_ycp_logo_forth-valley-gis> This email and its attachments are private and confidential. If you believe you have received this email in error, please contact the sender immediately on 01786 476060. If you are not the intended recipient, you may not rely on, use or disclose this email or any attachments in any way. thinkWhere Limited does not accept any liability for any damage that may be caused to the recipient's system or data by this email or any attachments. Please note that our email system may be subject to random monitoring by us. This Company accepts no liability for personal emails. thinkWhere is a limited company registered in Scotland with Registered Number SC315349 and having its Registered Office at Glendevon House, Castle Business Park, Stirling, FK9 4TZ.
_______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
