Skip to main content
Question

LineOnLine overlay - 1 milion lines versus 1 line

  • June 4, 2020
  • 4 replies
  • 30 views

lambertus
Enthusiast
Forum|alt.badge.img+23

 

First dataset

I created about 1 million lines between 1565 points. These points are locations and the lines are possible routes over a network between the locations. Many of these lines (=routes) overlap each other. This is my first dataset.

Second dataset

My second dataset consist also of lines. Part of these lines have an attribute value for attribute 'VWH' = 1. The other lines have a value of 0, VWH = 0.

Analysis

What I want to do now is to perform an intersection between the first and second dataset. For the second dataset the features are used where VWH = 1. Using the VWH =1 features I want to intersect dataset 1 and attach the VWH value to overlapping lines. See the figure below for the main idea.

First I dissolved dataset 2, for VWH =1, into one multipart feature using the LineCombiner followed by the Aggregator. The length of this multipart line feature is 7684 km.

Then I used a SpatialFilter to check which features of dataset 1 intersect the multipart feature.

Then I tried different transformers like LineOnLine, Buffer on dataset 2 + Clipper for the intersection operation. However, they all took quit a long time to process just using the first 5000 features of dataset 1. Any ideas how to solve this task?

My FME workbench till so far is attached as attachment.

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.

4 replies

Forum|alt.badge.img
  • 11 replies
  • June 4, 2020

You could try the SpatialRelator. It has an option Attributes that must differ. You can set it to fme_feature_type or any other attribute that is different for the two datasets.


Forum|alt.badge.img+2
  • 1891 replies
  • June 4, 2020

@lambertus It looks like you are trying to solve a linear referencing problem - dynamic segmentation. Have a look at this excellent presentation from Steph Stedman at Transport for London: Mind the Gap. She is using Snipprt to accomplish a similar task. Use SpatialFilter/Relator to associate the Dataset 2 to Dataset1 and then Snipper to split the lines. The alternative is either LineOnLineOverlayer or Intersector.

 

If you can attach a small sample of the data someone might create a proof-of-concept for you.


lambertus
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 141 replies
  • June 5, 2020

You could try the SpatialRelator. It has an option Attributes that must differ. You can set it to fme_feature_type or any other attribute that is different for the two datasets.

Thanks for your suggestion. However, it is not exactly what I am looking for :) I want to alter the geometry of dataset 1 to get online those parts where VWH =1, derived from dataset 2. The SpatialRelator just determines the type of relationship and does not alter geometry.


lambertus
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 141 replies
  • June 5, 2020

@lambertus It looks like you are trying to solve a linear referencing problem - dynamic segmentation. Have a look at this excellent presentation from Steph Stedman at Transport for London: Mind the Gap. She is using Snipprt to accomplish a similar task. Use SpatialFilter/Relator to associate the Dataset 2 to Dataset1 and then Snipper to split the lines. The alternative is either LineOnLineOverlayer or Intersector.

 

If you can attach a small sample of the data someone might create a proof-of-concept for you.

Interesting presentation! I am going to give it a try with the Snipper. Furthermore I will check whether I am allowed to upload some data to this post.