[GIS] Calculating a reverse Azimuth

azimuthqgis

using QGIS 18.16
I am trying to figure out how to cal a reverse azimuth. Basically the opposite direction. So if i have a azimuth of 163, I subtract 180 which gives me -17. I some how need to write a script or a field calc to then , for only the '-', numbers subtract that number form 360. which would give me 343 as the reversed azimuth.

Best Answer

Try if( "azimuth" < 180, "azimuth" + 180, "azimuth" - 180)

enter image description here

Related Question