Data Tree Length Merging

Hi Everyone.
Trying to match some data with geometry and there is a little mismatch I can’t sort out.

My data has 296 branches.
My geometry has 398 branches.

I can get my geometry to the 296 if I can merge the 4 deep data trees to 3 deep. I’m sure there is a simple way, I’m just not able to get it to play nicely.

Thanks so much for your help…

Post your file please

1 Like

So the first panel seems to merge the 4 deep paths to 3 correctly…
then the second panel isolates the existing 3 deep paths…

Then merge the 2 lists with correct patterns seems to work???
Is this the most effective and robust way???
Cheers

No…

Here’s the GH file…
FORUM2.gh (223.4 KB)

maybe find out, why you have a datatree with different pathes / branches that have different depth / length ? and sort out this part of your gh-file ?
this will be the most robust solution.

otherwise maybe a multiline-pathmapper ?
(which will fail if you have path-length that is not covered by the expressions, for example while updaten part of the definition)

another approach might be (comments / feedbacks are welcome) dynamically recreate new pathes and use them with “replace paths”. with this approach you are more or less doing a custom path-mapper - that can react on different input.

both in attached file:

FORUM2_maybe_Tom_p.gh (226.8 KB)

kind regards -tom

Thanks Tom I will give that a shot.
The reason is Heron spits out multiple lists of points per record.

Try using Heron’s Topiary Flatten component. These uneven branches usually occur due to building footprints with courtyards or with multi-polygon footprints. The Topiary Flatten was built to help deal with cleaning up the trees.

Awesome!
Thanks Brian!!