You are here: Geometric OperatorsIntersector

Intersector

Computes intersections between all input features, breaking lines and polygons wherever an intersection occurs. In addition, all overlapping segments are reduced to one segment before being output.

Output Ports

Parameters

Example

Using the Intersector and ListConcatenator to Solve Problems

What if you have linear street centerlines and, at each intersection point, you'd like to know which streets come together? The output should be a set of points, each with a single string attribute containing a comma-separated set of the street names.

You can solve this by setting up a workspace that routes all the street centerlines into an Intersector. Adjust the parameters of the Intersector to supply a list name; for example, all_streets.

Let's assume that the input street lines had an attribute called NAME. Now, among other things, the Node output of the Intersector will have an unqualified list on it called all_streets{}.NAME. This list will hold the names of all the streets that intersect at each particular point (or Node) that is output.

To turn the list of NAMEs into a single string, add a ListConcatenator transformer and run the Node features into it. Then set up the ListConcatenator's parameters so that it would put the contents of the all_streets{}.NAME list together, separated by commas, into the "result" attribute. Then route the output of the ListConcatenator to an output file, and ensure that the "result" attribute was routed to an attribute in the output. After running the translation, you will have the desired result.

Note that you could also access the individual street names by "exposing" some elements of your list (by right clicking on the attribute unqualified list name (in our example, "all_streets{}.NAME") and saying "Expose Elements", and entering the number of elements to expose. You'd then have to do something with those elements in your translation. (The disadvantage of this approach is that you need to know ahead of time how many list elements you want to work with -- so if 3 streets intersect at the same node and you only set yourself up to handle two, you'd have to do something special to handle that.)

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Transformer Categories

Geometric Operators

Search FME Knowledge Center

Search for samples and information about this transformer on the FME Knowledge Center.