maovieira at gmail.com
Thu Jul 6 07:38:01 PDT 2006
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).
+55 21 9499-6800
e-mail: maovieira at gmail.com
2006/7/6, Ezequias Rodrigues da Rocha <ezequias at recife.pe.gov.br>:
> Arnaud Lesauvage escreveu:
> > Ezequias Rodrigues da Rocha wrote:
> >> Ok, now I need to get the start and and point of a linestring
> >> feature. Could you tell me please ?
> >> Regards
> >> Ezequias
> >> Arnaud Lesauvage escreveu:
> >>> Ezequias Rodrigues da Rocha wrote:
> >>>> Hi list,
> >>>> Could someone tell me how to get an angle of a linestring feature ?
> >>>> Regards...
> >>> The azimuth(geometry, geometry) function might be what you are
> >>> looking for.
> >>> Input geometries are points, so you might use
> >>> Azimuth(StartPoint(geometry), EndPoint(geometry)) if geometry is a
> >>> Linestring.
> >>> http://postgis.refractions.net/docs/ch06.html#id2528534
> > What do you think these "StartPoint" and "EndPoint" functions do ?
> > Have you read the documentation at http://postgis.refractions.net/docs/?
> > All you questions are answered there.
> > PS : Please, reply below the quotes. Thanks !
> > --
> > Arnaud
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> Arnaud (great name. The name of my grandfather),
> I tried like this but the result (as you can see now) is too below.
> dbpotgis=# SELECT azimuth(startpoint(the_geom),endpoint(the_geom)) as
> azimuth from mub where gid = 2900;
> (1 row)
> The real angle is 143,9 and the function only rerutns 2.17...
> Could you tell me what I did wrong ?
> Regards ...
> postgis-users mailing list
> postgis-users at postgis.refractions.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users