[SGVLUG] Distance between two locations

Michael Proctor-Smith mproctor13 at gmail.com
Sat Aug 4 11:14:53 PDT 2007


On 8/4/07, Peter Fogg <peter.fogg at sbcglobal.net> wrote:
> Thanks for the responses, guys! My requirement is for great circle
> distance between locations. There is code out there for calculating the
> required distance but it requires that the longitude and latitude of
> the end-points be manually entered. This will, of course, work.
>
> However, the site is a MySpace-type site in which a a member can search
> for other members within a given distance. The distance required is
> great circle distance between addresses. BTW, within the Continental
> USA.
>
> I am hoping that I can contact someone with experience this capability
> in a Web site.

http://geocoder.us/ is based on perl code(it is in cpan) and us census
data(available for free, but only updated every 10 years)  that does
pretty good address to lat/long. I used it for a an on going project.
works well.

> Peter -
>
> On Aug 3, 2007, at 5:19 PM, Emerson, Tom (*IC) wrote:
>
> >> -----Original Message----- Of Peter Fogg
> >>
> >> The site that I am developing requires the ability to calculate the
> >> distance between to locations.
> >
> > Is this for distance "as the crow flies", or what it would actually
> > take
> > to "drive" from point A to point B?
> >
> > Straight-line distance is a simple formula [potentially made more
> > difficult by converting polar coordinates into cartesian].  Would
> > relative altitudes between the two locations be part of the problem?
> > (for example, the distance from one side to the other of a cliff might
> > be only 10 feet horizontally, but a couple thousand in the vertical
> > direction... ;) )
> >
> > "driving distance" would have to take into account one-way roads,
> > construction/blockages, traffic patterns (if you're trying to determine
> > "fastest" route, which will not be the "shortest" if traffic comes to a
> > standstill on the short route...)  This type of problem would indeed
> > have to have database of some sort for location of intersections,
> > blockages/one-way, etc.
> >
>
>


More information about the SGVLUG mailing list