{"action":"created","issue":{"url":"https://api.github.com/repos/davidmoten/rtree/issues/19","labels_url":"https://api.github.com/repos/davidmoten/rtree/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/davidmoten/rtree/issues/19/comments","events_url":"https://api.github.com/repos/davidmoten/rtree/issues/19/events","html_url":"https://github.com/davidmoten/rtree/issues/19","id":58851713,"number":19,"title":"`rtree.nearest` documentation wrong?","user":{"login":"virtuald","id":567900,"avatar_url":"https://avatars.githubusercontent.com/u/567900?v=3","gravatar_id":"","url":"https://api.github.com/users/virtuald","html_url":"https://github.com/virtuald","followers_url":"https://api.github.com/users/virtuald/followers","following_url":"https://api.github.com/users/virtuald/following{/other_user}","gists_url":"https://api.github.com/users/virtuald/gists{/gist_id}","starred_url":"https://api.github.com/users/virtuald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtuald/subscriptions","organizations_url":"https://api.github.com/users/virtuald/orgs","repos_url":"https://api.github.com/users/virtuald/repos","events_url":"https://api.github.com/users/virtuald/events{/privacy}","received_events_url":"https://api.github.com/users/virtuald/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-25T05:14:21Z","updated_at":"2015-03-25T16:24:02Z","closed_at":"2015-02-25T20:59:06Z","body":"Looking at the implementation of `rtree.nearest`, it states that it returns objects in no particular order. However, it looks like the comparator that it uses is called `ascendingDistance`... I haven't actually tested this of course, but was wondering."},"comment":{"url":"https://api.github.com/repos/davidmoten/rtree/issues/comments/86103688","html_url":"https://github.com/davidmoten/rtree/issues/19#issuecomment-86103688","issue_url":"https://api.github.com/repos/davidmoten/rtree/issues/19","id":86103688,"user":{"login":"virtuald","id":567900,"avatar_url":"https://avatars.githubusercontent.com/u/567900?v=3","gravatar_id":"","url":"https://api.github.com/users/virtuald","html_url":"https://github.com/virtuald","followers_url":"https://api.github.com/users/virtuald/followers","following_url":"https://api.github.com/users/virtuald/following{/other_user}","gists_url":"https://api.github.com/users/virtuald/gists{/gist_id}","starred_url":"https://api.github.com/users/virtuald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtuald/subscriptions","organizations_url":"https://api.github.com/users/virtuald/orgs","repos_url":"https://api.github.com/users/virtuald/repos","events_url":"https://api.github.com/users/virtuald/events{/privacy}","received_events_url":"https://api.github.com/users/virtuald/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T16:24:02Z","updated_at":"2015-03-25T16:24:02Z","body":"Ok, so you're using a `MinMaxPriorityQueue` underneath the hood, and the iterator returns results in no particular order --- so, therefore, your original comment on the code was correct. Very interesting.\r\n\r\nIt makes sense to me why it's done this way. However, it would be nice to have a version of the nearest method that *does* return them in sorted order. Presumably could just add a method that uses a different type of container to hold the results."}}