I'm using Spatialite +
ST_Project to extrapolate a line with an implied bearing between two points to some distance beyond those two points. Here's an example sql snippet:
SELECT AsGeoJSON(ST_Project( GeomFromText('POINT (-73.87172699 40.76195099)'), 5000000, ST_Azimuth( ST_GeomFromText('POINT (-73.87172699 40.76195099)'), ST_GeomFromText('POINT (-73.887831 40.804936)') ) ));
The third point produced from this reflects a geodesic, at least according to the PostGIS documentation for
ST_Project. And you can see in the images below that the "bearing" as illustrated on a spherical projection looks to be in line with the original two points. But when I try to create a line string from joining these three points — either using
ST_MakeLine or by manually assembling the new point with the existing two points in WKT text — the resulting line appears to use a great circle, and on a spherical projection it looks wrong, and doesn't align with the original two points' bearing:
Is there a way to draw a line, with Spatialite or PostGIS, that would follow the projected geodesic used by
ST_Project? I'm trying to illustrate what it would look like to walk in a visually straight line between the two original points to some arbitrary distance beyond those two points; I understand the great circle line here to be the shorter path, but I'm not sure I understand if they also reflect the path you'd take were you to walk along the earth from the azimuth/bearing between the two original points. Is there a different PostGIS/Spatialite function I should be using to illustrate this geodesic? Am I thinking about this illustration wrong, and somehow the great circle line here is somehow more "correct" to reflect the path you'd take were you to walk in a straight line from the original two points?