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

Utilizing own centreline for polygon width calculation #14

Closed peanutbutter-memory closed 1 year ago

peanutbutter-memory commented 1 year ago

Hi,

Thanks for developing this tool!

Question - Can I use own centreline to generate width?

Use case: Utilize own centreline to generate width calculations for waterbody polygons. Centre lines through waterbodies has already been generated by national provider. Obtaining width measurements at set intervals is goal.

Background:

image

No features are written. image

Environment:

Thanks so much for any help:)

Richard

BjornNyberg commented 1 year ago

Hi Richard,

Thanks for this comment. Unfortunately this is a part that is not well documented in the wiki. There are two options to create width measurements from your own centerline:

The first option is the easiest to run by utilizing the 'Transects by Distance' tool that will create a perpendicular width measurement along the centerline at each specified distance point and does not require an ID field. However, this option will not cut the width measurement to the polygon shape.

Presentation1

Option two is somewhat more cumbersome and prone to erros but requires the following steps:

  1. As you mentioned both the centerline and polygon need a unique 'ID' field that is case sensitive!
  2. Run the 'Distance Along Centerline' tool found under the Line Tools tab to create a new 'Distance' field required by the algorithm. Note - Use the explode lines function otherwise there will be only one distance measurement. If you require multiple distance segments then apply the 'Vertex Density' option as well.
  3. Run the 'Geometric Attributes' tool found under the Polygon Tools tab to create the width measurements.

Presentation2

Hopefully that helps @richardburcher Björn

peanutbutter-memory commented 1 year ago

Thanks so much Björn for this.

Was able to replicate with Transects by Distance.

This approach will help with our project work☺

Cheers,

Richard

Richard Burcher (he/him, il/lui)

Software Specialist Ocean, Coastal and River Engineering National Research Council National Research Council Canada / Government of Canada

Developpeur Logiciels Génie Océanique, Côtier et Fluvial Conseil national de recherches Canada / Gouvernement du Canada

From: BjornNyberg @. Sent: January 10, 2023 4:33 PM To: BjornNyberg/Geometric-Attributes-Toolbox @.> Cc: Burcher, Richard @.>; Mention @.> Subject: Re: [BjornNyberg/Geometric-Attributes-Toolbox] Utilizing own centreline for polygon width calculation (Issue #14)

Attention This email originated from outside of the NRC. Attention Ce courriel provient de l'extérieur du CNRC.

Hi Richard,

Thanks for this comment. Unfortunately this is a part that is not well documented in the wiki. There are two options to create width measurements:

The first option is the easiest to run by utilizing the 'Transects by Distance' tool that will create a perpendicular width measurement along the centerline at each specified distance point and does not require an ID field. However, this option will not cut the width measurement to the polygon shape.

[Presentation1]https://user-images.githubusercontent.com/37108459/211663551-138d6c1c-944e-497a-89b6-5425db269a04.gif

Option two is somewhat more cumbersome and prone to erros but requires the following steps:

  1. As you mentioned both the centerline and polygon need a unique 'ID' field that is case sensitive!
  2. Run the 'Distance Along Centerline' tool found under the Line Tools tab to create a new 'Distance' field required by the algorithm. Note - Use the explode lines function otherwise there will be only one distance measurement. If you require multiple distance segments then apply the 'Vertex Density' option as well.
  3. Run the 'Geometric Attributes' tool found under the Polygon Tools tab to create the width measurements.

[Presentation2]https://user-images.githubusercontent.com/37108459/211665198-9bbcd552-61eb-4bde-9a88-b516a501a75e.gif

Hopefully that helps @richardburcherhttps://github.com/richardburcher Björn

peanutbutter-memory commented 1 year ago

Closing issue as it has been resolved.

Thanks again for the help!!