Ezequias:<br> 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).
<br>Regards.<br>-- <br>Marco Vieira<br>+55 21 9499-6800<br>e-mail: <a href="mailto:maovieira@gmail.com">maovieira@gmail.com</a>
<br><div><span class="gmail_quote">2006/7/6, Ezequias Rodrigues da Rocha <<a href="mailto:ezequias@recife.pe.gov.br">ezequias@recife.pe.gov.br</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Arnaud Lesauvage escreveu:<br>> Ezequias Rodrigues da Rocha wrote:<br>>> Ok, now I need to get the start and and point of a linestring<br>>> feature. Could you tell me please ?<br>>><br>>> Regards
<br>>> Ezequias<br>>><br>>> Arnaud Lesauvage escreveu:<br>>>> Ezequias Rodrigues da Rocha wrote:<br>>>>> Hi list,<br>>>>><br>>>>> Could someone tell me how to get an angle of a linestring feature ?
<br>>>>><br>>>>> Regards...<br>>>>><br>>>><br>>>> The azimuth(geometry, geometry) function might be what you are<br>>>> looking for.<br>>>> Input geometries are points, so you might use
<br>>>> Azimuth(StartPoint(geometry), EndPoint(geometry)) if geometry is a<br>>>> Linestring.<br>>>><br>>>> <a href="http://postgis.refractions.net/docs/ch06.html#id2528534">http://postgis.refractions.net/docs/ch06.html#id2528534
</a><br>><br>><br>> What do you think these "StartPoint" and "EndPoint" functions do ?<br>> Have you read the documentation at <a href="http://postgis.refractions.net/docs/">http://postgis.refractions.net/docs/
</a> ?<br>> All you questions are answered there.<br>><br>><br>> PS : Please, reply below the quotes. Thanks !<br>><br>> --<br>> Arnaud<br>><br>> _______________________________________________<br>
> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br>><br>Arnaud (great name. The name of my grandfather),<br><br>I tried like this but the result (as you can see now) is too below.<br><br>dbpotgis=# SELECT azimuth(startpoint(the_geom),endpoint(the_geom)) as<br>azimuth from mub where gid = 2900;
<br>     azimuth<br>------------------<br> 2.17998093202836<br>(1 row)<br><br>dbpotgis=#<br><br>The real angle is 143,9 and the function only rerutns 2.17...<br><br>Could you tell me what I did wrong ?<br><br>Regards ...<br>
_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></blockquote></div><br><br clear="all"><br>