Skip to main content
Solved

How to intersect only the lines with different attributes


ischu
Contributor
Forum|alt.badge.img+2
  • Contributor

Hi all,

I have two Feature classes, one are roads and the other one are fences. What I want to do is to intersect only the fences where they intersect with roads and not by themselves.

What would do the job is an Intersector with a parameter 'Attribute(s) that must Differ' like the parameter of the Spatial Realator, but this parameter does not exist on Intersector - so is there any work around to that?

Any help is much appreciated

Best answer by takashi

Hi @ischu, this may be a possible way. Assuming that every road feature has an attribute storing a value which can be used to determine if the feature is a road.

  1. Send all the roads and fences to a LineOnLineOverlayer (or Intersector), and specify a list name to the "List Name" parameter of the transformer.
  2. From the resulting points, select only points having an element of the list, which indicates that its value is propagated from a road. The ListSearcher can be used to filter the points.
  3. Add a PointOnLineOverlayer to the workspace. Send the selected points to the Point port, and send the original fence lines to the Line port. The resulting lines will be the fences which have been split by intersections between roads.
View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • Best Answer
  • April 5, 2016

Hi @ischu, this may be a possible way. Assuming that every road feature has an attribute storing a value which can be used to determine if the feature is a road.

  1. Send all the roads and fences to a LineOnLineOverlayer (or Intersector), and specify a list name to the "List Name" parameter of the transformer.
  2. From the resulting points, select only points having an element of the list, which indicates that its value is propagated from a road. The ListSearcher can be used to filter the points.
  3. Add a PointOnLineOverlayer to the workspace. Send the selected points to the Point port, and send the original fence lines to the Line port. The resulting lines will be the fences which have been split by intersections between roads.

ischu
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • April 5, 2016
takashi wrote:

Hi @ischu, this may be a possible way. Assuming that every road feature has an attribute storing a value which can be used to determine if the feature is a road.

  1. Send all the roads and fences to a LineOnLineOverlayer (or Intersector), and specify a list name to the "List Name" parameter of the transformer.
  2. From the resulting points, select only points having an element of the list, which indicates that its value is propagated from a road. The ListSearcher can be used to filter the points.
  3. Add a PointOnLineOverlayer to the workspace. Send the selected points to the Point port, and send the original fence lines to the Line port. The resulting lines will be the fences which have been split by intersections between roads.

Hi Takashi,

it works just fine!

Thanks a lot


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings