[Qgis-user] user defined format for new bearing tool?
C Hamilton
adenaculture at gmail.com
Wed Nov 3 07:53:45 PDT 2021
Richard,
The Shape Tools plugin has a geodesic measure tool
<https://github.com/NationalSecurityAgency/qgis-shapetools-plugin#--geodesic-measure-tool>
that in addition to distance, displays the bearing to and bearing from two
points. Right now it just displays in decimal degrees, but it wouldn't be
difficult to add a setting option to display in a DMS format. Give it a try
and let me know whether you think it would be helpful to include a DMS
format.
Thanks,
Calvin
On Tue, Nov 2, 2021 at 9:56 AM Richard Greenwood <
richard.greenwood at gmail.com> wrote:
> Is it possible for a user to add a format to the new bearing tool in 3.22?
> Cadastral descriptions in the United States are usually expressed in
> degrees, minutes, seconds in four quadrants e.g.
> N 45°27'18"W or S 15°07'54"E, etc.
> I have a SQL expression below that I use for labeling in that format. I
> would like to add it as a format option in the bearing tool.
> concat(
> case
> when degrees(azimuth(start_point($geometry), end_point($geometry)))< 90
> then CONCAT('N',to_dms(degrees(azimuth(start_point($geometry),
> end_point($geometry))), 'x',0,'aligned'))
> when degrees(azimuth(start_point($geometry), end_point($geometry)))<
> 180
> then CONCAT('S', to_dms(180 -
> degrees(azimuth(start_point($geometry), end_point($geometry))),
> 'x',0,'aligned'))
> when degrees(azimuth(start_point($geometry), end_point($geometry)))<
> 270
> then CONCAT('S', to_dms(degrees(azimuth(start_point($geometry),
> end_point($geometry))) -180, 'x',0), '°W')
> else
> CONCAT('N', to_dms(360 - degrees(azimuth(start_point($geometry),
> end_point($geometry))), 'x',0), 'W')
> end
> )
>
> --
> Richard W. Greenwood
> www.greenwoodmap.com
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211103/0c6afbc5/attachment.html>
More information about the Qgis-user
mailing list