[postgis-users] Calculate accumulative bearing given a zig-zagging line

Shaozhong SHI shishaozhong at gmail.com
Thu Feb 17 00:21:24 PST 2022


Is there a function for calculating accumulative bearing given a
zig-zagging line?

If we set a segment to travel towards north and its bearing is 0. Next
segment may zig-zag towards 10 degrees.  The following one may zig-zag
towards -5 degree.

Calculating accumulative bearing may assist us to check whether a line does
a U-turn.  If accumulative bearing is greater than 180, it is a U-turn.

Is there such function available?

Regards,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220217/9349055e/attachment.html>


More information about the postgis-users mailing list