Skip to main content

 

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.

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.


@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.


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 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.

Reply