[postgis-users] not so Weird behaviour of ST_Project (PostGIS2)

Martin Feuchtwanger feumar at shaw.ca
Fri Feb 22 10:57:17 PST 2013


Things behave as you'd expect going north/south because meridians of 
longitude are great circles (shortest paths on globe).
However, when you go east/west, parallels of latitude and great circles 
(shortest paths) are *not* the same. Parallels are convenient lines 
representing the graticule and represent /orthodromes/ (lines of 
constant azimuth) but are not true great circles (which, presumably, 
st_project is following).
(FYI, if you were to follow an orthodrome in any other azimuth but the 
four cardinal directions, you'd spiral towards a pole!)
Spherical trigonometry's not always simple ;-)

Martin Feuchtwanger  feumar at shaw.ca  604-254-0361
Vancouver, BC  V5N 1J6
http://members.shaw.ca/geomatics.developer

On 21/02/2013 12:15 AM, News and Such wrote:
> Hello postgis'ers,
>
> somehow I can't understand the results of ST_Project, but maybe this 
> problem is just me being stupid (again):
> I just want to project a point in North, East, South and West direction.
>
> Note:
> I use geography-type here, but the results are the same for geometry.
> I use a rather long distance, because I need it, at least in one 
> direction, for my application. Because of this I found the "problem" 
> in the first place.
>
> With the direction north, everything is as I expect it:
>
> |SELECT ST_AsText(ST_Project('POINT(-30 -0.5)'::geography, 1e7, 
> radians(0)));
> st_astext -----------------------------
> POINT(-30 89.4874128664049) |
>
> But in the other directions, here for example East, I get this:
>
> |SELECT ST_AsText(ST_Project('POINT(-30 -0.5)'::geography, 1e7, 
> radians(90)));
> st_astext ---------------------------------------------
> POINT(59.8315233716443 0.00116689648502556) |
>
> Shouldn't this be |POINT(59.8315233716443 -0.5)| ? Why are both 
> coordinates changing?
>
> This behaviour occurs in all directions save north.
>
> I'm new to the whole earth coordinate system-stuff so maybe I missed 
> something, but I thought that when one walks directly west (or south) 
> one would, by definition, not leave the current longitude (or 
> latitude)-line but only change the other.
>
> Any help would be appreciated!
> Thank you.
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

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


More information about the postgis-users mailing list