<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I am working with PostgreSQL v9.1.11 and PostGIS 2.1.0. I am trying
to use st_distance_sphere to calculate the distance between various
points and am getting results that don't make sense. According to
the documentation, that function should return the distance in
meters between the 2 points supplied. Here are two examples that
demonstrate the issue I am having:<br>
<br>
<font face="Courier New, Courier, monospace">select
st_distance_sphere(<br>
st_setsrid(st_makepoint(33.44, -82.60), 4326), -- location
near Warrenton, GA<br>
st_setsrid(st_makepoint(33.533, -82.517), 4326) -- locaton
near Thomson, GA<br>
)<br>
</font><br>
returns 9325.862 meters, or 5.8 miles, which seems correct<br>
<br>
<font face="Courier New, Courier, monospace">select
st_distance_sphere(<br>
st_setsrid(st_makepoint(33.44, -82.60), 4326), -- location
near Warrenton, GA<br>
st_setsrid(st_makepoint(32.819, -97.361), 4326) -- location
near Forth Worth, TX<br>
)<br>
</font><br>
returns 9873.560 meters, or 6.1 miles, which ain't even close.<br>
<br>
I have read and re-read the PostGIS docs and can't find anything I
am doing wrong. Is that function misbehaving or am I using it
incorrectly?<br>
<br>
Thanks in advance<br>
<br>
Mike<br>
</body>
</html>