Hi Andrea,

Nice shortcut - and use of the modulus operator! Now the calculation is really short!

Nevertheless it would be kind of nice to have a QGIS expression function to convert azimuth into math angles. I assume that Christine wouldn't be the only one looking for this calculation.

Christine - do you want to create a feature request for such an expression function at https://github.com/qgis/QGIS/issues ?

Andreas

On 2021-12-07 08:49, Andrea Giudiceandrea wrote:

Richard Greenwood [1] Mon, 06 Dec 2021 10:57:06 -0800 [2]

g = (450-m) - int((450-m) / 360) * 360
where m = mathematical angle (0 east, anti-clockwise)
and g = geographic angle (0 north, clockwise)

Which is equivalent to:

g = (450-m) % 360

Best regards.

Andrea Giudiceandrea
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



Links:
------
[1] https://www.mail-archive.com/[email protected]&q=from:%22Richard+Greenwood%22 [2] https://www.mail-archive.com/[email protected]&q=date:20211206
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to