[postgis-users] distance query is not returning expected result

Jimmy Forrester jimmy at sparkleinteractive.co.uk
Sun Jan 25 07:03:58 PST 2009

Hey all, I'm new to postgis and implementing a few geographic features in to
my site. I'm having a bit of difficulty getting my distance calculations

select ST_Distance(    ST_Transform(ST_SetSRID(ST_Point(53.7996374,
-1.54911),     4326), 2163),
            ST_Transform(ST_SetSRID(ST_Point(53.6451179, -1.784876),
4326), 2163)
        ) / 1000

In the query above I'm testing the distance between Leeds & Huddersfield.
I'm trying to convert the 4326 srid geom to  srid 2163 which is meters (i
think!). For an unknown reason this is returning 64 km which i know is

I've plotted the coords on google maps and they are definitely correct,
google maps says the distance is about 24 km. see:


Any help on this would be great,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090125/72365b2c/attachment.html>

More information about the postgis-users mailing list