in reply to Calculating Distance

In Perl, you can use Math::Trig::great_circle_distance(). To run queries on the database, you'll need to cook up an SQL function which does the same calculation.

Added: Yes, this would be a good place for a stored procedure.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Calculating Distance
by Herkum (Parson) on Feb 21, 2007 at 18:41 UTC
    If he is using Postgresql, could he create a procedure that does this?
      If he is using Postgresql then PostGIS might also be helpful.