[postgis-users] Angle between three points

Carlos Eduardo carlospauluk at gmail.com
Fri Sep 17 10:51:37 PDT 2010


Hello,

I'm building a google maps application, and I need to do some
calculation with polygons. I have several points in cartesian system
(lat/lng)
that I use to create the polygons. I need to remove some of this points,
because they are irrelevants (i.e. are too close to each other, or is a
point
in the middle of a line, so it could be removed for sure) and are consuming
memory vainly.
So, the logic that I thinked was to get three of the points of the polygon,
and taking the middle point as the origin point, and the two others to
make the lines, and then calc the angle between this two lines. if it is
close to 180 degrees,
i can remove the middle point. And so I would do this sequentially.

I couldn't find a postgis function that can return me the angle between two
lines,
so any suggestions???


Thank you all
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100917/762b9b81/attachment.html>


More information about the postgis-users mailing list