This one will be a challenge.

I have a table in my database of cities. They all have a geo lat and lon coordinate in the same row. That location is central of the city.

In a second table, I have a list of stores. Each store has a geo lat/lon of it's location.

What I want is when someone searches a city. Los Angeles for example. It want it to return all stores within a 100m radius of the city lat/lon location.

Any ideas for a starting point?

nzkiwi80
I have commonly seen this done with a list of postal codes (aka ZIP codes in the US). This gives you a finer level of detail than just city-by-city. Driving 5 or 10 miles in LA can take you over and hour sometimes. I'm sure the situation is similar in London or other large urban areas.

Are your latitude and longitude in radians or degrees?

    Write a Reply...