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.
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.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.