Skip to main content

Hello,

I have lines (linestring) that intersect forming Multilinestring. I would like to know if it possible to "force" them to keep the Linestring format?

Example: here is a network with a loop (in red)

imageOn FME, I tried a deagregator which gives me 3 polylines , 3 linestring. Ok it's good! But I want juste one line and impossible for me to find how to merge these 3 lines without convert all in Multilinestring.

I tried the LineCombiner but nothing happens, I still had my 3 lines.imageAny help would be appreciated :)

Thanks you

If the vertices of the endpoints of the lines are not on exactly the same location, the LineCombiner will not connect them. You can try to fix this using the Snapper transformer upstream of the LineCombiner.


great Idea but the problem still here!

image


great Idea but the problem still here!

image

In the linecombiner, you group by the attribute idchemin, so all 3 lines have the same attribute? Just checking. Can you upload an FFS with the 3 lines? Difficult to say what is wrong from printscreens.


In the linecombiner, you group by the attribute idchemin, so all 3 lines have the same attribute? Just checking. Can you upload an FFS with the 3 lines? Difficult to say what is wrong from printscreens.

Yes it's the same.

I uploaded a FFS, thank you for your help


In the linecombiner, you group by the attribute idchemin, so all 3 lines have the same attribute? Just checking. Can you upload an FFS with the 3 lines? Difficult to say what is wrong from printscreens.

I now better understand your issue. The line is self intersecting, creating 3 parts due to the self intersect. I do not have a solution now but someone else probably has.

 

2023-12-08_09h33_52


In the linecombiner, you group by the attribute idchemin, so all 3 lines have the same attribute? Just checking. Can you upload an FFS with the 3 lines? Difficult to say what is wrong from printscreens.

Yes the self intersecting create 3 parts. I Would like to know if it's possible to "force" the line ,don't create the 3 parts, still have just one line?

If somebody has an idea ... 😊


In the linecombiner, you group by the attribute idchemin, so all 3 lines have the same attribute? Just checking. Can you upload an FFS with the 3 lines? Difficult to say what is wrong from printscreens.

single-line@kael112 I finally got it drawn correctly yay! However, I have not quite figured out how to make this dynamic. I have to manually rearrange the part number to get this to work. I have attached fme workspace with annotations to help explain what I did. Please let me know if you figure out how to make it dynamic!


In the linecombiner, you group by the attribute idchemin, so all 3 lines have the same attribute? Just checking. Can you upload an FFS with the 3 lines? Difficult to say what is wrong from printscreens.

Thank you @panda​ , it works!


@panda​ 

your script works fine in a one way but how to do in a round trip. I tried and this is the result

imageimageDo You know a way to do this?

thank you


@panda​ 

your script works fine in a one way but how to do in a round trip. I tried and this is the result

imageimageDo You know a way to do this?

thank you

Do you mind provide me the .ffs for those feature please.


Do you mind provide me the .ffs for those feature please.

Here you will find a line which is in fact two compiled lines (the forward and the return)

Thank you for your help


Do you mind provide me the .ffs for those feature please.

So I personally never deal with road network before. The way I do it may be wrong. But I think the issue is at this location.OriginalIntersectI'm wondering if you can fix these verticies manually. I'm not quite sure how to remove some of these verticies in FME without spend couple more hours on it. I remove some of the verticies in the middle and move each of the line end vertex to make it connect without intersect each other. I'm not sure if this is the acceptable way to make road network. But this way it fixed the multipart line and turn it into single line with the same exact workspace i provided before.

intersect


Do you mind provide me the .ffs for those feature please.

I'm agree with you, it requests hours and manuel work to get a perfect network.

Thank for your help.


Do you mind provide me the .ffs for those feature please.

Let me know if the way I fix it is how it is supposed to be? When I have free time, I'll work on this. I imagine I will eventually run into this issue at some point.


Reply