BjornNyberg / Geometric-Attributes-Toolbox

The Geometric Attributes toolbox is a set of QGIS tools designed for the geometric attribute and shape characterization of modern depositional elements
GNU General Public License v3.0
74 stars 8 forks source link

DWidthL and DwidthR error #12

Closed Sean-Ferguson1 closed 2 years ago

Sean-Ferguson1 commented 2 years ago

Hi Bjorn,

I seem to be having an issue with the output of the Geometric Attributes tool. Based on the information in the manual and the paper, I understand that the Geometric Attributes tool calculates attributes “DWidthL” and “DWidthR”, which represent the deviated width left and right of the centerline, respectively. I understand the tool also computes attribute “Diff”, which represents the difference between the deviated width left and right of the centerline.

I would like to use attributes “DWidthL”, “DWidhtR”, and “Diff” to identify and remove erroneous width measurements, as recommended in the manual and paper. However, computed values for “DWidthL” and “DWidthR” appear to be miscalculated based on some preliminary testing that I completed.

I have included some screenshots showing my workflow below. As shown in the screenshots, computed “Widths” appear to be accurate (a width of 55.4m is computed for the highlighted transect). However, values -656.4m and -711.8m are computed for “DWidthL” and “DWidthR”, which are incorrect. Based on the QGIS measuring tool, “DWidthL” and “DWidthR” for this transect should be approximately 27.2m and 28.2m (which sum to the total width of 55.4m).

==========

Versions: QGIS 3.10.12 Geometric Attributes 0.3

Workflow: Working in projected coordinate system EPSG: 26918 (NAD83 / UTM zone 18N)

  1. Execute Centerlines tool

    • Polygons = river_example.shp
    • Centerlines = Centerlines
    • Densify Vertex Spacing = 20.0
    • Output: river_centerline.shp
  2. Execute Geometric Attributes tool

    • Polygons = river_example.shp
    • Centerlines = river_centerline.shp
    • Sample By Distance = True
    • Samples = 20.0

Screenshots:

image

image

image

image

Files:

river_example.zip

BjornNyberg commented 2 years ago

Hi @Sean-Ferguson1

Thanks for your message. Its been a while since I have looked at this script and I can see where the confusion may arise now.

The DWidthL and DWidthR refers to the deviated width from the shortest path line. I.e. in your case the DWidthL is a -711.8m deviation from the shortest path line whereas the DWidthR is -656.4m deviation from the shortest path line.

image

The Diff attribute is a measurement of the difference between the width measurements. i.e. in your highlighted example, a 95% diff value means a 95% difference between the left and right width measurements from the centerpoint or roughly (27.2/28.2)*100.

To make this easier, ive added two new attributes fields produced by the geometric attributes script that are LWidth and RWidth which refer to those two values. Simply reinstall the plugin from the plugin manager.

image

Thanks once again and if you could point me in the right direction to where the confusion was in the manual I would be most appreciative.

Cheers, Björn

Sean-Ferguson1 commented 2 years ago

Hi Björn,

Thank you very much for your speedy reply! I have reinstalled the plugin and am confirming that I see the two new attributes "WidthL" and "WidthR" as you indicated above.

My confusion came from the table at the bottom of page 7 of the manual, which summarizes the output provided by the Geometric Attributes tool. The table indicates that "DWidthL" and "DWidthR" represent deviated width left and right of the centerline. However, as discussed, these attributes actually represent deviated width left and right of the shortest path line.

image

Thank you again for your help!

Sean