2

I am trying to convert a line shapefile with branches into just one polyline, actually deleting every other diramation.

Imagine something like this:

:________|__________|____|||______

into

:___________________________________

(dont consider the two dots, had to put them for format reason)

I could do it manually but it would take alot of time. Maybe using some sort pf shortest path could work but I am not sure.

  • this is actually not trivial in a lot of scenarios. say, in a specific case when those branches are tiny (e.g. artefacts) compared to the base line (e.g. the size relations in your keyboard character example), a buffer-out_union_buffer-in with flat caps and widths based on line length might do the trick. in most other real world scenarios however, you will need any way (e.g. attributes) of determing the lines to keep. knowing the definite start/end point would help a lot (and is necessary for a graph based approach). and what kind of 'network' do you have there exactly? – ThingumaBob Jun 23 at 20:28
  • Hello, thanks for the reply. I have a river axis generated through a plugin which i think created a voronoi skeleton to determine the axis. I was left with the axis + alor of minor transversal lines which the plugin used to assess the distance from the riverbed limits. these branches are very short and i clearly can point the start and end of the main axis. – Riccardo Boniardi Jun 23 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.