[postgis-users] deriving distance between lat/long points.
Gary Sherman
sherman at mrcc.com
Tue Aug 16 19:14:13 PDT 2005
On Aug 16, 2005, at 5:06 PM, Brent Wood wrote:
>
> Hi y'all...
>
> I am often being asked to work out the distance between two points
> (lat/long
> WGS84), for genetic cline or mark recapture type studies.
>
> I figured to make my life easier by writing a shell script to
> invoke PostGIS to
> do this. But it seems not, at least so far :-)
>
Actually you can do this with a little bit of code and bypass PostGIS
(sorry list). Take a look at http://www.codeguru.com/Cpp/Cpp/
algorithms/general/article.php/c5115/ for a good article on this topic.
The code example is C++ but its pretty easy to distill down into
perl, python, etc. I've used this method in the
past to write a small python script to do exactly what you want.
Unfortunately the script and the dodo bird now share
the same fate.
-gary
More information about the postgis-users
mailing list