{"action":"closed","issue":{"url":"https://api.github.com/repos/qgis/qgis3.0_api/issues/13","repository_url":"https://api.github.com/repos/qgis/qgis3.0_api","labels_url":"https://api.github.com/repos/qgis/qgis3.0_api/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/qgis/qgis3.0_api/issues/13/comments","events_url":"https://api.github.com/repos/qgis/qgis3.0_api/issues/13/events","html_url":"https://github.com/qgis/qgis3.0_api/issues/13","id":119782930,"number":13,"title":"Remove geometry pointer accessors from QgsFeature","user":{"login":"nyalldawson","id":1829991,"avatar_url":"https://avatars.githubusercontent.com/u/1829991?v=3","gravatar_id":"","url":"https://api.github.com/users/nyalldawson","html_url":"https://github.com/nyalldawson","followers_url":"https://api.github.com/users/nyalldawson/followers","following_url":"https://api.github.com/users/nyalldawson/following{/other_user}","gists_url":"https://api.github.com/users/nyalldawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nyalldawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyalldawson/subscriptions","organizations_url":"https://api.github.com/users/nyalldawson/orgs","repos_url":"https://api.github.com/users/nyalldawson/repos","events_url":"https://api.github.com/users/nyalldawson/events{/privacy}","received_events_url":"https://api.github.com/users/nyalldawson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-12-01T18:53:54Z","updated_at":"2016-08-02T02:01:42Z","closed_at":"2016-08-02T02:01:42Z","body":"Most of the heavy lifting for this is already done, but the accessors in QgsFeature for retrieving pointers to the geometry should be removed. Instead, we should have a single getter:\r\n\r\n    QgsGeometry geometry () const\r\n\r\nAnd a setter:\r\n\r\n   void setGeometry( const QgsGeometry& geometry )\r\n\r\nThese would take advantage of the (already implemented) implicit sharing of geometries, and avoid the current dangerous use of pointers to geometries. Amongst other issues, this would simplify the API for PyQGIS (no more need for `g=QgsGeometry( feat.geometry() ) ` c++ style code) and finally allow us to fix http://hub.qgis.org/issues/777\r\n\r\nAlmost all of the c++ code now uses the constGeometry() getter rather than modifying geometries in place, so changing this behaviour should be straightforward for the c++ code. The core python code would also need to be updated, and this is likely to be more work as it would require removal of any in place modifiers.\r\n"}}
{"actor":{"display_login":"nyalldawson"}}