The Generate ID By Intersect method can be used to uniquely identify features with an incrementing value and intersecting feature value. For example, this method can be used to populate the Hydrant (point feature class) facility ID using a combination of Fire District (polygon feature class) code and sequential asset ID. The following example shows how to configure the DynamicValue Table, polygon feature class, GenerateID table, and sample point feature class.
DynamicValue table
TABLENAME | FIELDNAME | VALUEINFO |
Hydrant | FACILITYID | Fire District|GRIDID|GRIDSEQ|3|Hydrant [ID]-[SEQ] |
An explanation of VALUEINFO:
Value | Description |
Fire District | The name of the polygon layer containing the grids. |
GRIDID | Field in Fire District layer containing the grid code. |
GRIDSEQ | The static portion of SEQNAME in the GenerateID table. Since there are four quadrants, there must be four rows whose SEQNAME is GRIDSEQ* (where * is the corresponding value defined in the GRIDID field in the Fire District layer). |
3 | Left-pad the SEQCOUNTER value so that its string length is at least three characters. |
Hydrant [ID]-[SEQ] | [ID] and [SEQ] refer to the GRIDID value of the intersecting feature and current SEQCOUNTER, respectively. These placeholder texts are replaced at method execution with the actual values. All other text is written as-is. |
Fire District Feature Class
1
2
3
4
GRIDID | LOCATION |
1 | northwest |
2 | northeast |
3 | southwest |
4 | southeast |
GenerateID table
SEQNAME | SEQCOUNTER | SEQINTERV |
---|---|---|
GRIDSEQ1 | 0 | 1 |
GRIDSEQ2 | 123 | 5 |
GRIDSEQ3 | 78 | 10 |
GRIDSEQ4 | 17 | -2 |
For each feature in the Hydrant layer that intersects a feature in the Fire District layer, the SEQCOUNTER value is incremented by the SEQINTERV value. This new value replaces the [SEQ]
placeholder text.
Hydrant Feature Class
FACILITYID | LOCATION |
Hydrant 1-001 | NW |
Hydrant 1-002 | NW |
Hydrant 2-128 | NE |
Hydrant 2-133 | NE |
Hydrant 3-088 | SW |
Hydrant 3-098 | SW |
Hydrant 4-017 | SE |
Hydrant 4-015 | SE |