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
67 stars 8 forks source link

Fail to Create Centreline from River Polygon #19

Closed muhammadbagushari closed 11 months ago

muhammadbagushari commented 11 months ago

Hi. Good afternoon.

I have failed to create centreline along my river polygon. The centreline just shown in some part of river polygon like shown in the picture below. Can you help me to solve this issue? image

(the red line in the picture attached is the centreline that is created by plugin)

Centreline method : All Trim iterations : 10 QGIS version : QGIS 3.28.9

BjornNyberg commented 11 months ago

Hi @muhammadbagushari

Use the 'Densify Vertex Spacing' option to add more vertices. Try with a large number first e.g., 1000 m? and then progressively use a smaller value. There is a tradeoff between accuracy vs efficency here...

muhammadbagushari commented 11 months ago

Hi Bjorn,

I have tried to use several value in 'Densify Vertex Spacing' : 1000 , 2000, 500 ; however, it does not create a significant change in the output. It is still the same like the picture that I have attached previously.

My river length : 6600 meters.

BjornNyberg commented 11 months ago

@muhammadbagushari Hi again,

Considering your river length is not that long - try a smaller number. Start with say 50 and then go all the way down to 5? and check out the results.

muhammadbagushari commented 11 months ago

I have tried to use ‘Densify Vertex Spacing’ : 50, 40, 20, 5 ; but unfortunately, the result is nearly the same. I do not know why it can not generate the centerline along the polygon .

BjornNyberg commented 11 months ago

@muhammadbagushari

That is indeed strange. What projection system are you using? Additionally, it would help if you can share a sample dataset to test the issue.

muhammadbagushari commented 11 months ago

oh, it works now. I think the problem is because I use the EPSG 4326:WGS 84 projection. After I change it to EPSG:32748:WGS 84/UTM 48S, it works and can create the centreline along the polygon.

Thank you so much for the help.

have a nice day!

I will close the issue.

BjornNyberg commented 11 months ago

@muhammadbagushari

Glad you found the solution. The issue here is that a geographical coordinate system is measured in degrees rather than meters. Ideally to measure geometries you want to use a projected coordinate system.