Skip to main content
Solved

How to intersect only the lines with different attributes

  • April 5, 2016
  • 2 replies
  • 31 views

ischu
Contributor
Forum|alt.badge.img+2

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

2 replies

takashi
Celebrity
  • 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

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