{"action":"created","issue":{"url":"https://api.github.com/repos/qgis/QGIS/issues/2989","repository_url":"https://api.github.com/repos/qgis/QGIS","labels_url":"https://api.github.com/repos/qgis/QGIS/issues/2989/labels{/name}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/2989/comments","events_url":"https://api.github.com/repos/qgis/QGIS/issues/2989/events","html_url":"https://github.com/qgis/QGIS/pull/2989","id":147228010,"number":2989,"title":"Default datum transform for Server","user":{"login":"mhugent","id":278939,"avatar_url":"https://avatars.githubusercontent.com/u/278939?v=3","gravatar_id":"","url":"https://api.github.com/users/mhugent","html_url":"https://github.com/mhugent","followers_url":"https://api.github.com/users/mhugent/followers","following_url":"https://api.github.com/users/mhugent/following{/other_user}","gists_url":"https://api.github.com/users/mhugent/gists{/gist_id}","starred_url":"https://api.github.com/users/mhugent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhugent/subscriptions","organizations_url":"https://api.github.com/users/mhugent/orgs","repos_url":"https://api.github.com/users/mhugent/repos","events_url":"https://api.github.com/users/mhugent/events{/privacy}","received_events_url":"https://api.github.com/users/mhugent/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-10T14:06:30Z","updated_at":"2016-04-12T06:30:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/2989","html_url":"https://github.com/qgis/QGIS/pull/2989","diff_url":"https://github.com/qgis/QGIS/pull/2989.diff","patch_url":"https://github.com/qgis/QGIS/pull/2989.patch"},"body":"(First travis test)\r\n\r\nThis PR adds the possibility to set default datum transformations for QGIS server (from environment variable or from QSettings). To achieve this, the following changes have been made:\r\n\r\n- Reading of default datum transformation has been moved from QgsMapCanvas (gui) to QgsMapSettings (core) such that it can also be used by the server. If a dialog is needed (for the desktop case), a signal is sent from QgsMapSettings to QgsMapCanvas\r\n\r\n- The server code has been changed from QgsMapRenderer to use the newer QgsMapRenderJob / QgsMapSettings classes"},"comment":{"url":"https://api.github.com/repos/qgis/QGIS/issues/comments/208729077","html_url":"https://github.com/qgis/QGIS/pull/2989#issuecomment-208729077","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/2989","id":208729077,"user":{"login":"m-kuhn","id":588407,"avatar_url":"https://avatars.githubusercontent.com/u/588407?v=3","gravatar_id":"","url":"https://api.github.com/users/m-kuhn","html_url":"https://github.com/m-kuhn","followers_url":"https://api.github.com/users/m-kuhn/followers","following_url":"https://api.github.com/users/m-kuhn/following{/other_user}","gists_url":"https://api.github.com/users/m-kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/m-kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-kuhn/subscriptions","organizations_url":"https://api.github.com/users/m-kuhn/orgs","repos_url":"https://api.github.com/users/m-kuhn/repos","events_url":"https://api.github.com/users/m-kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/m-kuhn/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T06:30:13Z","updated_at":"2016-04-12T06:30:13Z","body":"On 04/12/2016 08:11 AM, mhugent wrote:\n>\n> The only reason for the QObject is the possibility to send out a\n> signal if there is no default datum transform (to show a dialog to the\n> user in the GUI case). If there is another good possibility to achieve\n> the same, them I'm of course fine with it.\n>\n\nCouldn't this be checked when filling the QgsMapSetting with the\nconfiguration?\n\n> Not sure if the overhead of QObject is really that big. And normally,\n> we don't have thousands of QgsMapSettings\n>\n>     I wonder what happens to the map settings object if it tries to\n>     find the datum transform in another >thread than the main thread\n>\n> Afaik signals/slots can be sent between threads without problems, see\n> e.g. http://doc.qt.io/qt-4.8/threads-qobject.html: \"More interesting\n> is that QObjects can be used in multiple threads, emit signals that\n> invoke slots in other threads, and post events to objects that \"live\"\n> in other threads\"\n>\n\nWhich connection type will be used? If it's Qt::AutoConnection it should\nbe mapped to a Qt::QueuedConnection which is posted on a different event\nloop. In this case what happens to the reference which is sent with the\nsignal and supposed to be modified by the receiver?\n\n> —\n> You are receiving this because you commented.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/qgis/QGIS/pull/2989#issuecomment-208724040>\n>\n\n-- \nMatthias Kuhn\nOPENGIS.ch - https://www.opengis.ch\nSpatial • (Q)GIS • PostGIS • Open Source\n\n"}}