[Qgis-user] representation of angles in QGIS - recalculation to arithmetic values

Andreas Neumann a.neumann at carto.net
Mon Dec 6 23:59:25 PST 2021


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
> Qgis-user at lists.osgeo.org
> 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/search?l=qgis-user@lists.osgeo.org&q=from:%22Richard+Greenwood%22
[2] 
https://www.mail-archive.com/search?l=qgis-user@lists.osgeo.org&q=date:20211206
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211207/2078c41f/attachment.html>


More information about the Qgis-user mailing list