Solved

Split line with points and keep overlapping segments

  • 19 February 2019
  • 14 replies
  • 39 views

Hi,

I want to split lines with points but I really need to keep all the overlaping segments. I tried with the PointOnLineOverlayer but, like the Intersector, in this transformer, all overlapping segments are reduced to one segment before being output.

In the image below, you can imagine a road with a dead end. The result must contain 5 lines and not 4. Moreover, the Intersector isn't good for me because I don't want to split lines on all intersections (only on points).

Sample of my data here :

Thank you very much

 

Julien

icon

Best answer by arnovananrooij 20 February 2019, 13:17

View original

14 replies

Userlevel 4
Badge +30

Hi @julien_m

Did you try to use the Topology Builder?

If you want to share us your vectors to test.

 

Thanks

Danilo

Userlevel 6
Badge +32

Not a solution but the Intersector can output both lines. From the documentation:

Separate Collinear Segments
If Yes - causes overlapping segments not to be merged into a single segment: one copy is output for each original feature sharing the segment. Each such segment will have the respective original feature’s attributes as its main attributes, and attributes from all other collinear features will be added as a list attribute, if the list name was supplied.

When a coverage of polygons is input, the set of topologically significant lines which form their boundaries is output.

 

Not a solution but the Intersector can output both lines. From the documentation:

Separate Collinear Segments
If Yes - causes overlapping segments not to be merged into a single segment: one copy is output for each original feature sharing the segment. Each such segment will have the respective original feature’s attributes as its main attributes, and attributes from all other collinear features will be added as a list attribute, if the list name was supplied.

When a coverage of polygons is input, the set of topologically significant lines which form their boundaries is output.

 

I know for the Intersector. The problem with this transformer is that I don't want to split lines on all intersections (only on points). The Intersector cuts the crossing line and I don't want to do this.

Hi @julien_m

Did you try to use the Topology Builder?

If you want to share us your vectors to test.

 

Thanks

Danilo

I tried the TopologyBuilder but It doesn't cut the line.

Here is a sample of my data (shapefile) : split_but_keep_overlap_segments.zip

Userlevel 4
Badge +30

I tried the TopologyBuilder but It doesn't cut the line.

Here is a sample of my data (shapefile) : split_but_keep_overlap_segments.zip

Thanks your dataset.

I used here the transformer PointOnLineOverlayer with Point Tolerance 0.1 with sucess.

 

Attached the Workspace template ( .FMWT ) - Workspace_Template.fmwt

 

Thanks,

Danilo

Thanks your dataset.

I used here the transformer PointOnLineOverlayer with Point Tolerance 0.1 with sucess.

 

Attached the Workspace template ( .FMWT ) - Workspace_Template.fmwt

 

Thanks,

Danilo

Thank you Danilo for your answer. I already tried this. In my sample data, the result must have 23 lines and not 19.

If you look closer at the result after the PointOnLineOverlayer, the self overlap lines seem to be cut only once (not by all points).

The results have to be this :

 

The Intersectors can to that but it cuts the crossing lines and I don't want that. My data contain road with bridge.

Userlevel 4
Badge +30

Thank you Danilo for your answer. I already tried this. In my sample data, the result must have 23 lines and not 19.

If you look closer at the result after the PointOnLineOverlayer, the self overlap lines seem to be cut only once (not by all points).

The results have to be this :

 

The Intersectors can to that but it cuts the crossing lines and I don't want that. My data contain road with bridge.

Hello,

Please, check the image bellow. The point is not touching the line:

 

Thanks,

Hello,

Please, check the image bellow. The point is not touching the line:

 

Thanks,

Yes, but I think that with the "Point tolerance" parameters set to 1 meters (for this example) this isn't suppose to be a problem.

I also try to snap the point on the line and rerun the workspace and the result is still the same.

Badge +4

Hi @julien_m,

This is quit a hard one. I tried putting it together myself. I think the result should be 21 lines and 2 overlaps which makes it 23 together. In your drwaing you forgot to count 2 lines. I my workspace I end up with 24 lines so there is one to many, but I could not figure out how to solve that one. Maybe you could have a look at what I tried to do with the chopper and the matcher to find the double lines.

split2waylineswithpoints.fmw

Userlevel 1
Badge +10

Yes, but I think that with the "Point tolerance" parameters set to 1 meters (for this example) this isn't suppose to be a problem.

I also try to snap the point on the line and rerun the workspace and the result is still the same.

I think this is a deficiency in the point on line overlayer as even with a mocked up line with exact matching coordinates the line is not split correctly.

Userlevel 1
Badge +10

I have a workflow I built for a similar issue, and it seems to work for your data, but it's never been tested in anger. It also relies on there being a vertex in the line that is close to the point you want to chop with and some questionable python

chop_at_index.fmwt

I think this is a deficiency in the point on line overlayer as even with a mocked up line with exact matching coordinates the line is not split correctly.

I think too :(

I have a workflow I built for a similar issue, and it seems to work for your data, but it's never been tested in anger. It also relies on there being a vertex in the line that is close to the point you want to chop with and some questionable python

chop_at_index.fmwt

Thank you very much, I will try this.

Could you take a picture of your workbench. I use FME 2017 and there are some transformers in problem with my version when I open your template.

Thank you :)

Hi @julien_m,

This is quit a hard one. I tried putting it together myself. I think the result should be 21 lines and 2 overlaps which makes it 23 together. In your drwaing you forgot to count 2 lines. I my workspace I end up with 24 lines so there is one to many, but I could not figure out how to solve that one. Maybe you could have a look at what I tried to do with the chopper and the matcher to find the double lines.

split2waylineswithpoints.fmw

Thank you @arnovananrooij,

This works pretty well. With my FME 2017 version, I end up with 29 lines. I discover that some very small lines appear near from my points. Il will try to find why.

For the moment, this is the closest solution to what I want.

Thank you

Reply