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
Best answer by ebygomm
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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
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.
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)
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
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.