{"action":"created","issue":{"url":"https://api.github.com/repos/osmlab/atlas/issues/141","repository_url":"https://api.github.com/repos/osmlab/atlas","labels_url":"https://api.github.com/repos/osmlab/atlas/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/osmlab/atlas/issues/141/comments","events_url":"https://api.github.com/repos/osmlab/atlas/issues/141/events","html_url":"https://github.com/osmlab/atlas/pull/141","id":333467014,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NjczNzg1","number":141,"title":"Fixed bug in areasCovering that overincluded results.","user":{"login":"lucaspcram","id":8269882,"node_id":"MDQ6VXNlcjgyNjk4ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/8269882?v=4","gravatar_id":"","url":"https://api.github.com/users/lucaspcram","html_url":"https://github.com/lucaspcram","followers_url":"https://api.github.com/users/lucaspcram/followers","following_url":"https://api.github.com/users/lucaspcram/following{/other_user}","gists_url":"https://api.github.com/users/lucaspcram/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaspcram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaspcram/subscriptions","organizations_url":"https://api.github.com/users/lucaspcram/orgs","repos_url":"https://api.github.com/users/lucaspcram/repos","events_url":"https://api.github.com/users/lucaspcram/events{/privacy}","received_events_url":"https://api.github.com/users/lucaspcram/received_events","type":"User","site_admin":false},"labels":[{"id":664543817,"node_id":"MDU6TGFiZWw2NjQ1NDM4MTc=","url":"https://api.github.com/repos/osmlab/atlas/labels/Bug","name":"Bug","color":"ee0701","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-18T23:16:36Z","updated_at":"2018-06-19T20:05:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/osmlab/atlas/pulls/141","html_url":"https://github.com/osmlab/atlas/pull/141","diff_url":"https://github.com/osmlab/atlas/pull/141.diff","patch_url":"https://github.com/osmlab/atlas/pull/141.patch"},"body":"Previously, the `areasCovering` method in `AbstractAtlas` did not check if the target `Location` was actually fully enclosed by the `Area` in question. This caused the resulting set to over-include `Locations` that were within the bounding box of the `Area`, but not necessarily enclosed by the true `Area` geometry.\r\n\r\nInterestingly enough, this change seems to break the `testLocationContaining` unit test in `PackedAtlasTest`. This is because the unit test uses `Locations` that are on the boundaries of the `Areas` in question. Since the new `areasCovering` code uses `fullyGeometricallyEncloses`, points on the border of a polygon are not considered enclosed by the polygon. I have fixed the unit test to better reflect the semantics implied by `areasCovering`.\r\n\r\nUnrelated, but also removed a misleading, outdated comment in the `RelationMember` class."},"comment":{"url":"https://api.github.com/repos/osmlab/atlas/issues/comments/398527574","html_url":"https://github.com/osmlab/atlas/pull/141#issuecomment-398527574","issue_url":"https://api.github.com/repos/osmlab/atlas/issues/141","id":398527574,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODUyNzU3NA==","user":{"login":"lucaspcram","id":8269882,"node_id":"MDQ6VXNlcjgyNjk4ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/8269882?v=4","gravatar_id":"","url":"https://api.github.com/users/lucaspcram","html_url":"https://github.com/lucaspcram","followers_url":"https://api.github.com/users/lucaspcram/followers","following_url":"https://api.github.com/users/lucaspcram/following{/other_user}","gists_url":"https://api.github.com/users/lucaspcram/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaspcram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaspcram/subscriptions","organizations_url":"https://api.github.com/users/lucaspcram/orgs","repos_url":"https://api.github.com/users/lucaspcram/repos","events_url":"https://api.github.com/users/lucaspcram/events{/privacy}","received_events_url":"https://api.github.com/users/lucaspcram/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T20:05:32Z","updated_at":"2018-06-19T20:05:32Z","author_association":"CONTRIBUTOR","body":"@jwpgage Indeed. I believe it is due to the way we implement `Polygon.fullyGeometricallyEncloses(Location)`. In the case that there is no AWT overflow, it defaults to the AWT `Polygon.contains` implementation, [which defines \"insideness\" like so.](https://docs.oracle.com/javase/8/docs/api/java/awt/Shape.html#def_insideness). If you plot out the test geometry, it looks like the test `Locations` violate rule 2 of the definition I linked."}}
{"actor":{"display_login":"lucaspcram"}}