Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

somehow I can't understand the results of ST_Project, but maybe this problem is just me being stupid (again):

Note:

  • I use geography-type here, but the results are the same for geometry.
  • I use a rather long distance, because I need, at least in one direction, for my application a large distance. Because of this I found the problem in the first place.

So I just want to project a point towards North, East, South and West. 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) ?

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.

share|improve this question
add comment

1 Answer 1

Straight lines on the sphere (paths you achieve by moving straight and not turning) are not lines of constant bearing, with only a couple exceptions (north/south meridians and the equator).

ST_Project projects along a great circle (a straight line in spherical terms), starting with the given bearing.

Lines of latitude (except the equator) are not great circles, so projecting directly east and west will not land you at a position on the same line of latitude.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.