Reputation: 605
I want to do the following.
I want to create an app that does the following
How can I do this in the most effective way?
If the restaurant gives me their address, should I be converting that address to longitude/latitude points, and then somehow using that to get the distance from the person A current location? But how do I do this so effectively so that if there are 1000 addresses in the database, I can efficiently sort all of these addresses - nearest to person A first- without taking too much time? Thanks!
I am using django.
Upvotes: 6
Views: 7022
Reputation: 1979
Take a look at GeoDjango and PostGIS.
GeoDjango will give you the ability to store geo informations and do distance lookups.
You also could use OSMGeoAdmin or django-location-field to help you easily fill the location fields.
Upvotes: 2
Reputation: 6292
You can simply use Cloudmade's Geocoding API to locate the restaurant from the provided address.
And then you use Cloudmade's Routing API to find the distances.
Upvotes: 0