{"action":"opened","issue":{"url":"https://api.github.com/repos/airmanopus/weatherCheck/issues/109","labels_url":"https://api.github.com/repos/airmanopus/weatherCheck/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/airmanopus/weatherCheck/issues/109/comments","events_url":"https://api.github.com/repos/airmanopus/weatherCheck/issues/109/events","html_url":"https://github.com/airmanopus/weatherCheck/issues/109","id":86455506,"number":109,"title":"Add even-odd test for polygons to see if our location (lat,lon) is in the polygon specified in an alert","user":{"login":"airmanopus","id":1474613,"avatar_url":"https://avatars.githubusercontent.com/u/1474613?v=3","gravatar_id":"","url":"https://api.github.com/users/airmanopus","html_url":"https://github.com/airmanopus","followers_url":"https://api.github.com/users/airmanopus/followers","following_url":"https://api.github.com/users/airmanopus/following{/other_user}","gists_url":"https://api.github.com/users/airmanopus/gists{/gist_id}","starred_url":"https://api.github.com/users/airmanopus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airmanopus/subscriptions","organizations_url":"https://api.github.com/users/airmanopus/orgs","repos_url":"https://api.github.com/users/airmanopus/repos","events_url":"https://api.github.com/users/airmanopus/events{/privacy}","received_events_url":"https://api.github.com/users/airmanopus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/airmanopus/weatherCheck/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"airmanopus","id":1474613,"avatar_url":"https://avatars.githubusercontent.com/u/1474613?v=3","gravatar_id":"","url":"https://api.github.com/users/airmanopus","html_url":"https://github.com/airmanopus","followers_url":"https://api.github.com/users/airmanopus/followers","following_url":"https://api.github.com/users/airmanopus/following{/other_user}","gists_url":"https://api.github.com/users/airmanopus/gists{/gist_id}","starred_url":"https://api.github.com/users/airmanopus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airmanopus/subscriptions","organizations_url":"https://api.github.com/users/airmanopus/orgs","repos_url":"https://api.github.com/users/airmanopus/repos","events_url":"https://api.github.com/users/airmanopus/events{/privacy}","received_events_url":"https://api.github.com/users/airmanopus/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/airmanopus/weatherCheck/milestones/9","html_url":"https://github.com/airmanopus/weatherCheck/milestones/v0.4.0","labels_url":"https://api.github.com/repos/airmanopus/weatherCheck/milestones/9/labels","id":970218,"number":9,"title":"v0.4.0","description":"- [ ] Rewrite backend node stuff to use NWS's RSS feeds for alerts instead of scraping alert links\r\n","creator":{"login":"airmanopus","id":1474613,"avatar_url":"https://avatars.githubusercontent.com/u/1474613?v=3","gravatar_id":"","url":"https://api.github.com/users/airmanopus","html_url":"https://github.com/airmanopus","followers_url":"https://api.github.com/users/airmanopus/followers","following_url":"https://api.github.com/users/airmanopus/following{/other_user}","gists_url":"https://api.github.com/users/airmanopus/gists{/gist_id}","starred_url":"https://api.github.com/users/airmanopus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airmanopus/subscriptions","organizations_url":"https://api.github.com/users/airmanopus/orgs","repos_url":"https://api.github.com/users/airmanopus/repos","events_url":"https://api.github.com/users/airmanopus/events{/privacy}","received_events_url":"https://api.github.com/users/airmanopus/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":5,"state":"open","created_at":"2015-02-08T02:16:19Z","updated_at":"2015-06-09T05:27:41Z","due_on":"2015-06-30T05:00:00Z","closed_at":null},"comments":0,"created_at":"2015-06-09T05:27:41Z","updated_at":"2015-06-09T05:27:41Z","closed_at":null,"body":"The county matching algorithm I used starting in https://github.com/airmanopus/weatherCheck/commit/1688ca1f9ea0fe74157fb7cf3e30a9311cd6494b, which is based on being able to geocode the device's location and then reverse geocode the address to figure out what county/parish we're standing in works. It requires two ajaxy calls though, both of which take extra time and bandwidth (in addition to the baseline resources used by ajaxing the alerts themselves.\r\n\r\nIf NWS supplies a polygon (a list of coordinates that make up the vertices), we can use the even-odd rule to determine if the device location is within the polygon, which will take CPU time but will not require the additional two network requests.\r\n\r\nSee https://github.com/airmanopus/weatherCheck/commit/6595dc7a0b269d68874caf82238c327dbae7f808\r\n\r\nhttp://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\r\nhttp://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\r\nhttp://www.cs.tufts.edu/~alex/comp175-fall2008/Lectures/comp175-4-raster_based_filling_fill_rules.pdf\r\n\r\nand \r\n\r\nJ. D. Foley, A. van Dam, S. K. Feiner, and J. F. Hughes. Computer Graphics: Principles and Practice. The Systems Programming Series. Addison-Wesley, Reading, 2nd edition, 1990 (which is on the shelf in UPL)\r\n"}}