{"action":"created","issue":{"url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r/issues/2","repository_url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r","labels_url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r/issues/2/comments","events_url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r/issues/2/events","html_url":"https://github.com/GBIF-Europe/nordic_oikos_2018_r/pull/2","id":295197914,"number":2,"title":"fix geometry predicate - use within - in occ_download call (?)","user":{"login":"mskyttner","id":1715840,"avatar_url":"https://avatars0.githubusercontent.com/u/1715840?v=4","gravatar_id":"","url":"https://api.github.com/users/mskyttner","html_url":"https://github.com/mskyttner","followers_url":"https://api.github.com/users/mskyttner/followers","following_url":"https://api.github.com/users/mskyttner/following{/other_user}","gists_url":"https://api.github.com/users/mskyttner/gists{/gist_id}","starred_url":"https://api.github.com/users/mskyttner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mskyttner/subscriptions","organizations_url":"https://api.github.com/users/mskyttner/orgs","repos_url":"https://api.github.com/users/mskyttner/repos","events_url":"https://api.github.com/users/mskyttner/events{/privacy}","received_events_url":"https://api.github.com/users/mskyttner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"andersfi","id":10553405,"avatar_url":"https://avatars0.githubusercontent.com/u/10553405?v=4","gravatar_id":"","url":"https://api.github.com/users/andersfi","html_url":"https://github.com/andersfi","followers_url":"https://api.github.com/users/andersfi/followers","following_url":"https://api.github.com/users/andersfi/following{/other_user}","gists_url":"https://api.github.com/users/andersfi/gists{/gist_id}","starred_url":"https://api.github.com/users/andersfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersfi/subscriptions","organizations_url":"https://api.github.com/users/andersfi/orgs","repos_url":"https://api.github.com/users/andersfi/repos","events_url":"https://api.github.com/users/andersfi/events{/privacy}","received_events_url":"https://api.github.com/users/andersfi/received_events","type":"User","site_admin":false},"assignees":[{"login":"andersfi","id":10553405,"avatar_url":"https://avatars0.githubusercontent.com/u/10553405?v=4","gravatar_id":"","url":"https://api.github.com/users/andersfi","html_url":"https://github.com/andersfi","followers_url":"https://api.github.com/users/andersfi/followers","following_url":"https://api.github.com/users/andersfi/following{/other_user}","gists_url":"https://api.github.com/users/andersfi/gists{/gist_id}","starred_url":"https://api.github.com/users/andersfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersfi/subscriptions","organizations_url":"https://api.github.com/users/andersfi/orgs","repos_url":"https://api.github.com/users/andersfi/repos","events_url":"https://api.github.com/users/andersfi/events{/privacy}","received_events_url":"https://api.github.com/users/andersfi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-02-07T16:14:26Z","updated_at":"2018-02-07T18:58:12Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r/pulls/2","html_url":"https://github.com/GBIF-Europe/nordic_oikos_2018_r/pull/2","diff_url":"https://github.com/GBIF-Europe/nordic_oikos_2018_r/pull/2.diff","patch_url":"https://github.com/GBIF-Europe/nordic_oikos_2018_r/pull/2.patch"},"body":"This PR is an attempt to fix the occ_download() call issue #1 but I am not sure it is correct. The docs here https://www.gbif.org/developer/occurrence mention the \"within\" predicate as suitable for coordinates that are inside a POLYGON. Not sure if the equals ( = ) would be for coordinates on a polygon border, then?\r\n\r\nIn any case the call when made with \"geometry within ${wkt}\" seems to return the download key and later a data.frame that contains 87 observations (instead of the expected 66). The console log when printing download_key gives:\r\n\r\n```\r\n<<gbif download metadata>>\r\n  Status: PREPARING\r\n  Format: DWCA\r\n  Download key: 0002554-180131172636756\r\n  Created: 2018-02-07T15:52:34.436+0000\r\n  Modified: 2018-02-07T15:52:34.436+0000\r\n  Download link: http://api.gbif.org/v1/occurrence/download/request/0002554-180131172636756.zip\r\n  Total records: 0\r\n  Request: \r\n    type:  and\r\n    predicates: \r\n      > type:  or\r\n        predicates: \r\n          - type: equals, key: TAXON_KEY, value: 2346633\r\n          - type: equals, key: TAXON_KEY, value: 2366645\r\n      > type: equals, key: HAS_COORDINATE, value: TRUE\r\n      > type: equals, key: HAS_GEOSPATIAL_ISSUE, value: FALSE\r\n      > type: equals, key: COUNTRY, value: NO\r\n      > type: within, key: geometry, value: POLYGON((9.33 62.80, 9.33 64.20, 12.13 64.20, 12.13 62.80, 9.33 62.80))\r\n```"},"comment":{"url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r/issues/comments/363873245","html_url":"https://github.com/GBIF-Europe/nordic_oikos_2018_r/pull/2#issuecomment-363873245","issue_url":"https://api.github.com/repos/GBIF-Europe/nordic_oikos_2018_r/issues/2","id":363873245,"user":{"login":"andersfi","id":10553405,"avatar_url":"https://avatars0.githubusercontent.com/u/10553405?v=4","gravatar_id":"","url":"https://api.github.com/users/andersfi","html_url":"https://github.com/andersfi","followers_url":"https://api.github.com/users/andersfi/followers","following_url":"https://api.github.com/users/andersfi/following{/other_user}","gists_url":"https://api.github.com/users/andersfi/gists{/gist_id}","starred_url":"https://api.github.com/users/andersfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersfi/subscriptions","organizations_url":"https://api.github.com/users/andersfi/orgs","repos_url":"https://api.github.com/users/andersfi/repos","events_url":"https://api.github.com/users/andersfi/events{/privacy}","received_events_url":"https://api.github.com/users/andersfi/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T18:58:12Z","updated_at":"2018-02-07T18:58:12Z","author_association":"CONTRIBUTOR","body":"I'm not sure what is going on here! \r\n\r\nThe following search in the portal \"https://www.gbif.org/occurrence/search?has_coordinate=true&taxon_key=2346633&geometry=POLYGON%20((10.32989501953125%2063.26787016946243,%2010.32989501953125%2063.455051146616825,%2010.8819580078125%2063.455051146616825,%2010.8819580078125%2063.26787016946243,%2010.32989501953125%2063.26787016946243))\" returns **38 occurrences**. \r\n\r\nHowever, when pasting the polygon into the R script using the \"within\" predicative this returns **41 occurrences*. In this example, I can't' see how any potential differences between the \"within\" predicate or = should make a difference... "}}
{"actor":{"display_login":"andersfi"}}