{"action":"created","issue":{"url":"https://api.github.com/repos/pelias/pelias/issues/68","labels_url":"https://api.github.com/repos/pelias/pelias/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/pelias/pelias/issues/68/comments","events_url":"https://api.github.com/repos/pelias/pelias/issues/68/events","html_url":"https://github.com/pelias/pelias/issues/68","id":64605738,"number":68,"title":"interpolate addresses at query time","user":{"login":"sevko","id":4467604,"avatar_url":"https://avatars.githubusercontent.com/u/4467604?v=3","gravatar_id":"","url":"https://api.github.com/users/sevko","html_url":"https://github.com/sevko","followers_url":"https://api.github.com/users/sevko/followers","following_url":"https://api.github.com/users/sevko/following{/other_user}","gists_url":"https://api.github.com/users/sevko/gists{/gist_id}","starred_url":"https://api.github.com/users/sevko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevko/subscriptions","organizations_url":"https://api.github.com/users/sevko/orgs","repos_url":"https://api.github.com/users/sevko/repos","events_url":"https://api.github.com/users/sevko/events{/privacy}","received_events_url":"https://api.github.com/users/sevko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pelias/pelias/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-26T18:49:02Z","updated_at":"2015-07-28T21:29:06Z","closed_at":null,"body":"Now that some elasticsearch records will contain house numbers (along with other address data), it should be possible for us to approximate the location of an address if we don't have an exact match. For instance, if our index contains `1 Pelias Place` and `5 Pelias Place`, a query for `3 Pelias Place` should return the midpoint of the line segment between those two addresses. This will obviously fail when we're dealing with curved roads, but that should be a non-issue if we restrict interpolations to points that are within ~20 (?) meters of one another.\r\n\r\nWe'd need to:\r\n  1. identify that a given query is searching for an address\r\n  2. extract the house number\r\n  3. figure out whether a 100% match was returned\r\n  4. if not, sort the results by house number relative to the number searched for (see pelias/pelias#62)\r\n  5. interpolate a location between the top two results, *if* they're tolerably close"},"comment":{"url":"https://api.github.com/repos/pelias/pelias/issues/comments/125758786","html_url":"https://github.com/pelias/pelias/issues/68#issuecomment-125758786","issue_url":"https://api.github.com/repos/pelias/pelias/issues/68","id":125758786,"user":{"login":"riordan","id":227472,"avatar_url":"https://avatars.githubusercontent.com/u/227472?v=3","gravatar_id":"","url":"https://api.github.com/users/riordan","html_url":"https://github.com/riordan","followers_url":"https://api.github.com/users/riordan/followers","following_url":"https://api.github.com/users/riordan/following{/other_user}","gists_url":"https://api.github.com/users/riordan/gists{/gist_id}","starred_url":"https://api.github.com/users/riordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riordan/subscriptions","organizations_url":"https://api.github.com/users/riordan/orgs","repos_url":"https://api.github.com/users/riordan/repos","events_url":"https://api.github.com/users/riordan/events{/privacy}","received_events_url":"https://api.github.com/users/riordan/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T21:29:06Z","updated_at":"2015-07-28T21:29:06Z","body":"For the US, the Census Bureau releases an annual dataset called [TIGER/line](http://www.census.gov/geo/maps-data/data/tiger-line.html) that's every street centerline in the United States with data specifically for line interpolation geocoding. This is what drives the [PostGIS Tiger Geocoder extension](http://postgis.net/docs/Extras.html#Tiger_Geocoder) that Enigma recently built some [very effective tooling](http://blog.enigma.io/spin-up-the-tiger-geocoder-quickly/) to simplify.\n\nIt's also what lets [Nominatim](http://wiki.openstreetmap.org/wiki/Nominatim/Installation#Installing_Tiger_housenumber_data_for_the_US) return US addresses not hand-labeled in OSM.\n\nWouldn't solve every sparse area, but would at least get us excellent coverage in the US."}}