<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
It's a matter of spheroidal vs planar geometry. Your geometric
logic would work on the plane, but not on a spheroid. <br>
<br>
If st_project() assumes loxodromes (ie, lines of constant bearings,
aka, rhumb lines) are input, again your geometric logic would work,
but instead it assumes orthodromes (ie, shortest-route lines, aka,
geodesics) are input. On a spheroid, the two azimuths at the ends
of a shortest-route do not sum to 360 degrees, as they do on the
plane.<br>
<br>
I wouldn't file a bug report just yet ;-)<br>
<br>
<div class="moz-cite-prefix">On 15/12/2013 2:36 PM, Brent Wood
wrote: <br>
</div>
<blockquote
cite="mid:1387147018.1914.YahooMailNeo@web121201.mail.ne1.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">
<div>Hi,</div>
<div><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
times new roman,new york,times,serif; background-color:
transparent; font-style: normal;">I have been looking at using
ST_Project() to solve a problem I have (& in theory it is
perfect!).</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
times new roman,new york,times,serif; background-color:
transparent; font-style: normal;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
times new roman,new york,times,serif; background-color:
transparent; font-style: normal;">It seems to introduce some
inaccuarcies, which can be quite significant in some use
cases. The SQL below projects a new point 2km E, then back 2km
W. The result should be in the same place we started, but is
not, by a larger value than I'm comfortable with. The source
point location comes from a real dataset.<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
times new roman,new york,times,serif; background-color:
transparent; font-style: normal;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
times new roman,new york,times,serif; background-color:
transparent; font-style: normal;"><span style="font-family:
Courier New,courier,monaco,monospace,sans-serif;">select
Postgis_full_version();<br>
<br>
POSTGIS="2.0.1 r9979" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel.
4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08"
LIBXML="2.7.8" TOPOLOGY RASTER<br>
</span><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
times new roman,new york,times,serif; background-color:
transparent; font-style: normal;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"><span
style="font-family: Courier
New,courier,monaco,monospace,sans-serif;">select
ST_AsText(point) as point,<br>
ST_AsText(ST_Project(point, 2000,radians(90))) as
proj2k,</span></div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
times new roman,new york,times,serif; background-color:
transparent; font-style: normal;"><span style="font-family:
Courier New,courier,monaco,monospace,sans-serif;">
ST_AsText(ST_Project(ST_Project(point, 2000,radians(90)),
2000,radians(270))) as proj2k0<br>
from (select
ST_AsText(ST_SetSRID(ST_MakePoint(171.0259489718,
-45.2961933568),4326))::geography as point) as foo;</span></div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
Courier New,courier,monaco,monospace,sans-serif;
background-color: transparent; font-style: normal;"><span
style="font-family: Courier
New,courier,monaco,monospace,sans-serif;"><br>
</span></div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
Courier New,courier,monaco,monospace,sans-serif;
background-color: transparent; font-style: normal;"><span
style="font-family: Courier
New,courier,monaco,monospace,sans-serif;">point |
POINT(171.0259489718 -45.2961933568)<br>
proj2k | POINT(171.051446314948 -45.2961905108324)<br>
proj2k0 | POINT(171.025948973075 -45.296187664865)<br>
<br>
</span></div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;">The final
lat & lon should be the same as the original, but both
have changed, the latitude substantially more than the
longitude - even though the point latitude should be unchanged
(it only moved E & W, not N or S) </div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;">It gets
worse with larger distances, eg, at 2000km:</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"><span
style="font-family: Courier
New,courier,monaco,monospace,sans-serif;">select
ST_AsText(point) as point,<br>
ST_AsText(ST_Project(point, 2000000,radians(90))) as
proj2000k,<br>
ST_AsText(ST_Project(ST_Project(point,
2000000,radians(90)), 2000000,radians(270))) as proj2000k0<br>
from (select
ST_AsText(ST_SetSRID(ST_MakePoint(171.0259489718,
-45.2961933568),4326))::geography as point) as foo;<br>
<br>
point | POINT(171.0259489718 -45.2961933568)<br>
proj2000k | POINT(-164.264848338683 -42.5385273590618)<br>
proj2000k0 | POINT(172.015779821441 -40.0225960863261)</span></div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: Courier New,courier,monaco,monospace,sans-serif;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: Courier New,courier,monaco,monospace,sans-serif;"><span
style="font-family: times new roman,new york,times,serif;">it
causes over 1/2 degree change in the latitude.</span></div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;">Is this a
bug I should be submitting or have I missed something?</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;">Thanks</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"> Brent
Wood<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px;
background-color: transparent; font-style: normal;
font-family: times new roman,new york,times,serif;"></div>
</div>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<address><b>Martin Feuchtwanger</b> feumar@shaw.ca<br>
http://members.shaw.ca/geomatics.developer
<br>
<br>
</address>
<br>
</div>
</body>
</html>