[Qgis-user] user defined format for new bearing tool?

Richard Greenwood richard.greenwood at gmail.com
Wed Nov 3 17:25:03 PDT 2021


Wow, that's a serious set of tools! I'm working in small areas with
projected cartesian coordinates so geodesic distances with forward and back
azimuths is a bit more than I was looking for. Beyond DMS, I need bearings
in the quadrant format used in United States land description like the
diagram below. I've figured out the code to format the bearings for
labeling but my Python skills aren't yet strong enough to make an
interactive tool like yours.
[image: image.png]
Thanks,
Rich

On Wed, Nov 3, 2021 at 8:53 AM C Hamilton <adenaculture at gmail.com> wrote:

> 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
>>
>

-- 
Richard W. Greenwood
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211103/6645b4d2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3472 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211103/6645b4d2/attachment.png>


More information about the Qgis-user mailing list