[postgis-users] Angle

Eduardo Luís Garcia Escovar eduardo.escovar at 3wt.com.br
Thu Jul 6 10:34:11 PDT 2006


Ezequias Rodrigues da Rocha escreveu:
> marco vieira escreveu:
>> Ezequias:
>>  Look at postgis documentation. azimuth() returns radians, not 
>> degrees. You must divide by pi rad and multiply by 180 degrees to 
>> obtain 124,9 degrees. Make sure your azimuth is 143,9 by manual 
>> calculation using start and end points (make sure you are using the 
>> same start and end points).
>> Regards.
>> -- 
>> Marco Vieira
>> +55 21 9499-6800
>> e-mail: maovieira at gmail.com <mailto:maovieira at gmail.com>   
> Marco,
>
> I did the following:
>
> DesiredDegree = 180 - ColumnInRad /PI * 1 rad
>
> Whre 1 rad = 57.29577951
>
>
> Some features works someothers dont.
> :-) :-(
>
> Regards
> Ezequias
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
Ezequias,

You should have done like Marco said:

DesiredDegree = ColumnInRad/pi( )*180

Remember, this result is the azimuth (angle from the north, i.e., from 
the y axis, clockwise).

Hope this helps,
Eduardo



More information about the postgis-users mailing list