
I have two points p1 and p2.
SELECT ST_GeomFromText('POINT(92.78488163381019 55.9757874622428)', 4326) as p1,
ST_GeomFromText('POINT(92.78482645521103 55.97564239375992)', 4326) as p2
degree between points equal 200.824 and distance between points equal 16.492
SELECT degrees(ST_Azimuth(p1, p2)) as degree,
ST_Distance_Sphere(p1, p2) as distance</code></pre>
But i have different degree when i use st_Project with this arguments:
SELECT degrees(ST_Azimuth(p1, _p2)),
ST_Distance_Sphere(p1, p2)
FROM (
SELECT (ST_Project(p1, distance, radians(degree))::geometry as _p2 FROM ...
)
It returns:
st_distance_sphere || degrees
======================||====================
16.4661410575154 || 214.150581571718
Distance difference between (p1,p2) and (p1,_p2) changing only by 0.02 meter. But degree changing by 13 degrees.
Why degrees are not equal between other?
Postgis_full_version: "POSTGIS="2.0.3 r11128" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.9.0" LIBJSON="UNKNOWN" RASTER"
– Vsevolod Avramov Oct 23 '13 at 00:37ST_DistanceSpherewhere PostGIS casts geometry->geography https://dba.stackexchange.com/q/191277/2639 Love for you to look at that one – Evan Carroll Nov 20 '17 at 03:59