Skip to main content

Hello,

please, I have question about line merging. I have got data of furniture in buidling, but e.g. chest of drawers in 2D is chopped into 29 lines (check my pic below). What I need - merge all lines into one line feature. Unfortunately, there is no attribute what can define ID or unit of chest of drawers, so the geometry aggregation must be based on spatial touch. In drawing, there are lot of chests of drawers, not just one.

Any tips please?

Thank You so much!

Lubo

Send your lines into a spatial relator as both requestor and supplier to find relationships of lines that touch. Generate a list containing the unique id of each line with a relationship. Then use a listcombiner (custom transformer) with the source list as the list just generated and the unique id of each line as an additional source and this will create common groupings which you can then use to aggregate your features with.

 

Example with dummy data

Aggregate_by_touch.fmwt


@lazarlubomir

 

Looking at your example pic.

Assuming you don't have drawers that somehow relate spatially.

Just use a areabuilder then a dissolver.

LineOnAreaOverlay, Clipper or SpatialRelator the dissolved polygons with the lines. The lines now have common id's.

You might want to separate the diagonal lines from the rest first. Else there is no way of controlling which line piece will get joined. (conveniently bypassed in the previously provided answer by not having a wall thickness, therefore not actually answering the question)


@lazarlubomir

 

Looking at your example pic.

Assuming you don't have drawers that somehow relate spatially.

Just use a areabuilder then a dissolver.

LineOnAreaOverlay, Clipper or SpatialRelator the dissolved polygons with the lines. The lines now have common id's.

You might want to separate the diagonal lines from the rest first. Else there is no way of controlling which line piece will get joined. (conveniently bypassed in the previously provided answer by not having a wall thickness, therefore not actually answering the question)

I've presumed that they want a single feature made up of multiple line features aggregated together rather than joined lines


Hello @egomm, @gio,

thank both of you so much! Anyway @egomm solution is right for me, because as he mentioned, I need t ocreate single feature composed by multiple line features aggregated together.

Thank You once again!

Lubo


Reply