### Description

This tool calculates intersections between geometries (points, lines or polygons). If you specify a single input feature data source, then it calculates intersections between geometries within that dataset. If you specify two input datasets then the tool calculates intersections between each feature in the first dataset with the features in the second dataset.

The ‘dimension’ option allows you to control the dimension of the geometry returned: 0 refers to points, 1 refers to lines, and 2 refers to polygons. An intersection between points and any other geometry can only result in point geometries. Lines intersecting with lines can return either point geometries (where two lines cross), or line geometries (where two lines overlap exactly for a non-zero distance). Polygons intersecting with lines can result in either points (where the boundary of the polygon overlaps with the lines) or lines (the portion of the line that is contained by the polygon). And polygons intersecting with polygons can result in polygons (where the two polygons overlap) or points (there the boundaries of the polygons cross).

The output layer will contain the unique ID numbers of each of the geometries that were used to calculate the intersections, hence the need to specify a unique ID field for the input data sources. This means that you can join the attributes of the original tables to the output of this tool if you need to.

For within-layer intersections, the tool will only calculate an intersection once. If a layers has two features, A and B, the tool will start by calculating the intersection between A and B, but will then not calculate the intersection between B and A as this would create duplication in the output layer.

You may get unexpected results from this tool. I have noticed that calculations between two layers returns the geometries you would typically expect, but within-layer intersections sometimes do not. This is perhaps most apparent when calculating the point intersections within a single line layer (e.g. a roads layer). It appears that when the endpoints of two lines are exactly aligned the ESRI Intersect calculation will sometimes identify this as an intersection and return a point, but sometimes will not. It is not clear to me why this is the case, but it is recommended that you inspect the output of this tool carefully to determine if it meets with your expectations.

Intersections can be computationally expensive, therefore it is recommended that you consider taking steps to increase processing speed, especially for large datasets. Ensuring that your feature dataset has a spatial index can improve search speed (see the Add Spatial Index tool in ArcToolbox). You might also consider eliminating any features that are known to have no overlap with the features in another layer. For instance, the ArcMap Select By Location tool allows you to easily select overlapping features between two layers, which you can then export into two new (temporary) layers that are the input to this tool. Reducing the number of features in the layers will thus also improve search speeds.

### Syntax

isectfeatures(in, uidfield, out, [in2], [uidfield2], [dimension], [where]);

in | the input feature data source | |

uidfield | the unique ID field | |

out | the output feature data source | |

[in2] | the second input feature data source (if specified, calculates intersections between layers rather than within a single layer) | |

[uidfield2] | the unique ID field for the second data source (if specified) | |

[dimension] | the dimension of the output (0=point, 1=line, 2=poly); default: 0, 0 and 2 for point, line and polygon intersections respectively, and the default cannot be overridden if it is nonsensical, e.g. always 0 for point intersections (options: 0, 1, 2) | |

[where] | the filter/selection statement that will be applied to the first (‘in’, not ‘in2’) polygon feature class to identify a subset of polygons to process |

### Example

isectfeatures(in=”C:dataroads.shp”, uidfield=”ROADID”, out=”C:datardintersections.shp”);

isectfeatures(in=”C:dataroads.shp”, uidfield=”ROADID”, in2=”C:datarivers.shp”, uidfield2=”RIVERID”, out=”C:datard_river_crossings.shp”);

isectfeatures(in=”C:dataplots.shp”, uidfield=”PLOTID”, in2=”C:datalakes.shp”, uidfield2=”LAKEID”, out=”C:dataplot_water.shp”, dimension=2);