{"action":"created","issue":{"url":"https://api.github.com/repos/opengisch/projectgenerator/issues/194","repository_url":"https://api.github.com/repos/opengisch/projectgenerator","labels_url":"https://api.github.com/repos/opengisch/projectgenerator/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/opengisch/projectgenerator/issues/194/comments","events_url":"https://api.github.com/repos/opengisch/projectgenerator/issues/194/events","html_url":"https://github.com/opengisch/projectgenerator/pull/194","id":321818094,"number":194,"title":"Make PostgreSQL estimated metadata parameter optional in Generator class (by default True)","user":{"login":"gacarrillor","id":652785,"avatar_url":"https://avatars1.githubusercontent.com/u/652785?v=4","gravatar_id":"","url":"https://api.github.com/users/gacarrillor","html_url":"https://github.com/gacarrillor","followers_url":"https://api.github.com/users/gacarrillor/followers","following_url":"https://api.github.com/users/gacarrillor/following{/other_user}","gists_url":"https://api.github.com/users/gacarrillor/gists{/gist_id}","starred_url":"https://api.github.com/users/gacarrillor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gacarrillor/subscriptions","organizations_url":"https://api.github.com/users/gacarrillor/orgs","repos_url":"https://api.github.com/users/gacarrillor/repos","events_url":"https://api.github.com/users/gacarrillor/events{/privacy}","received_events_url":"https://api.github.com/users/gacarrillor/received_events","type":"User","site_admin":false},"labels":[{"id":888814158,"url":"https://api.github.com/repos/opengisch/projectgenerator/labels/for%20review","name":"for review","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-10T05:53:58Z","updated_at":"2018-05-16T12:09:52Z","closed_at":"2018-05-15T09:28:51Z","author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/opengisch/projectgenerator/pulls/194","html_url":"https://github.com/opengisch/projectgenerator/pull/194","diff_url":"https://github.com/opengisch/projectgenerator/pull/194.diff","patch_url":"https://github.com/opengisch/projectgenerator/pull/194.patch"},"body":"Several tools from our LADM plugin simply don't work as expected because the number of features in the database doesn't match the number of features QGIS returns when `estimatedmetadata` is `True`.\r\n\r\nThis PR allows us to switch that parameter off, while avoiding to alter the current behaviour for the rest of Project Generator users.\r\n\r\nI would say this is a critical issue for us.\r\n\r\n**Example 1:**\r\n\r\n + A layer in the database contains several features but QGIS returns `0` when calling `layer.featureCount()`.\r\n + A tool initially checks whether the layer has features or not. If no features are found, the tool does not continue.\r\n + Since QGIS returns `0` for `layer.featureCount()`, the tool does nothing beyond the first check, generating confusion for the user, who may be even seeing spatial data on QGIS canvas.\r\n\r\n**Example 2:**\r\n\r\n + There is no data stored in the layer, but QGIS says (because of the estimated metadata parameter) the layer does have data! \r\n\r\n![estimatedmetadata_1](https://user-images.githubusercontent.com/652785/39873840-a652975a-5431-11e8-950f-c255b7ae51e5.png)\r\n\r\n + When a tool does its check, the layer passes it and the tool continues (QGIS says there is data), but when the tool does its real job, for example, creating a Spatial Index, QGIS throws an exception (`QSpatialIndex` requires a layer with data).\r\n\r\n![estimatedmetadata_2](https://user-images.githubusercontent.com/652785/39873841-a6c60d02-5431-11e8-970b-623468dea73c.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/opengisch/projectgenerator/issues/comments/389495936","html_url":"https://github.com/opengisch/projectgenerator/pull/194#issuecomment-389495936","issue_url":"https://api.github.com/repos/opengisch/projectgenerator/issues/194","id":389495936,"user":{"login":"gacarrillor","id":652785,"avatar_url":"https://avatars1.githubusercontent.com/u/652785?v=4","gravatar_id":"","url":"https://api.github.com/users/gacarrillor","html_url":"https://github.com/gacarrillor","followers_url":"https://api.github.com/users/gacarrillor/followers","following_url":"https://api.github.com/users/gacarrillor/following{/other_user}","gists_url":"https://api.github.com/users/gacarrillor/gists{/gist_id}","starred_url":"https://api.github.com/users/gacarrillor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gacarrillor/subscriptions","organizations_url":"https://api.github.com/users/gacarrillor/orgs","repos_url":"https://api.github.com/users/gacarrillor/repos","events_url":"https://api.github.com/users/gacarrillor/events{/privacy}","received_events_url":"https://api.github.com/users/gacarrillor/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T12:09:52Z","updated_at":"2018-05-16T12:09:52Z","author_association":"COLLABORATOR","body":"We run vacuum when we are in trouble with QGIS feature count. I think users shouldn't have to be worried about that. It should just work for them with no additional actions in the database.\r\n\r\n> I'll work on that in this case :+1: \r\n\r\nGreat!"}}
{"actor":{"display_login":"gacarrillor"}}