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

News and Such for_spam at lavabit.com
Thu Feb 21 00:15:56 PST 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130221/d89f5f97/attachment.html>


More information about the postgis-users mailing list