I would like to ask what is the difference between geometry and geography using the PostGIS function ST_Azimuth
.
When I execute the following query:
SELECT degrees( ST_Azimuth(ST_MakePoint(21.304116745663165, 38.68607570952619), ST_MakePoint(21.286237118117278,38.71455640443629)) )
I get 327.880195438529
degrees.
But when I cast the geometries to geography as the following query :
SELECT degrees( ST_Azimuth(ST_MakePoint(21.304116745663165, 38.68607570952619)::geography, ST_MakePoint(21.286237118117278,38.71455640443629)::geography) )
I get 333.810802282843
degrees.
Does the cast to geography give a more accurate result? Or a different calculation is made?
My geometries have SRID=4326.
Thank you in advance.