[postgis-users] Use of Azimuth Function
Matthew Pulis
mpulis at gmail.com
Wed Feb 13 09:58:34 PST 2008
Hi,
I need to find the angle of elevation from one point to the previous point
in a route.
I have come up with this query :
select azimuth (
(select endpoint((geometryn ( the_geom,1))) from streets_3d where
gid=45305),
(select startpoint((geometryn(the_geom,1))) from streets_3d where gid=3800)
)
And the result I got is : 2.26067325611865
However when I tried to work it normally, using the TANGENT rule I got this
result : 0.689 radians.
Can someone please point out what I did wrong?
This is the endpoint of gid 45305 : "POINT(637677.049535278 239825.913222565
138.439494012 0)"
This is the startpoint of gid 3800 : "POINT(655579.694091448
225053.918041725 88.700036976 0)"
Both geometries are MULTILINESTRING and have 1 INESTRING according to
numgeometries(the_geom)
Does the z affect the angle? I tried it on the same table without the 3D
aspect and I got the same results as I got from table streets_3d.
Any help is much appreciated
Thanks and regards
Matthew Pulis
_____
I am using the free version of SPAMfighter for private users.
It has removed 22959 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter <http://www.spamfighter.com/len> for free now!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080213/3528abfe/attachment.html>
More information about the postgis-users
mailing list