Attribute Rules

All feature classes accessed by Attribute Rules must be located in the same database.

Unique ID Sequence

  • Every Markings GIS layer has a unique ID field that will be automatically populated by a Database Sequence

    • Markings Specialty Point - MARKINGS_SPECIALTY_POINT_ID

    • Markings Specialty Line - MARKINGS_SPECIALTY_LINE_ID

    • Markings Short Line - MARKINGS_SHORT_LINE_ID

    • Markings Long Line - MARKINGS_LONG_LINE_ID

  • Attribute Rule is not Editable

  • Triggers - Insert

  • Execution - Exclude from application evaluation

Text(NextSequenceValue("ATD_ADMIN.atd_markings_data_sequence"))

Intersection ID

  • Every Markings GIS layer has the INTERSECTION_ID field, which is automatically calculated based on a Thiessen Polygon layer of the COA Intersection Points layer. This layer is used to find the closest Intersection point to the new record that has been added.

  • If the Intersection ID that is automatically calculated is not the Intersection ID you would like entered, the field is editable where a new Intersection ID can be entered.

  • Triggers - Insert

  • Execution - Exclude from application evaluation

var intersectLayer = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.COA_Intersection_Points_TP"), $feature);
for (var fc in intersectLayer) {
   return fc.INTERSECTION_ID
}

Segment ID

  • Every Markings GIS layer has the SEGMENT_ID field, which is automatically calculated based on the ATD Maintained Streets Line layer.

  • If the Segment ID is left null or is automatically calculated to a Segment ID that is not ideal, the field is editable where a new Segment ID can be entered.

  • Triggers - Insert

  • Execution - Exclude from application evaluation

// Get closest feature - populates SEGMENT_ID field based on closest attribute

var searchDist = 1000;
var streets = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.ATD_Maintained_Streets", ['SEGMENT_ID'], true), Buffer($feature, searchDist, "feet"));
var cnt = Count(streets)
var nearestStreet;
var minDist = 250;
for (var f in streets) {
    var streetDist = Round(Distance(f, $feature, "feet"), 2);
    if (streetDist < minDist) {
       nearestStreet = f.SEGMENT_ID;
       minDist = streetDist;
    }
}
return nearestStreet;

CBD - Central Business District

  • All Markings GIS layers except Markings Long Line have a CBD field, which is automatically calculated based on the DAPCZ Polygon Layer. If the feature intersects with the Central Sector of the DAPCZ layer, the CBD field is coded to Yes, otherwise No.

  • If a feature is moved after it is created, the CBD field will automatically update.

  • The CBD field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule.

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

var DapczInt = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.dapcz", ["DAPCZ_SECTOR"]), $feature);
for (var fc in DapczInt) {
   if (fc.DAPCZ_SECTOR == 'Central') {
   return 'Y'
   }
   else {
   return 'N'
   }
}
if (Count(DapczInt) == 0) {
return 'N'
}

Signal Intersection

  • All Markings GIS layers except Markings Long Line have a SIGNAL_INTERSECTION field, which is automatically calculated based on a 100' Buffer Polygon layer of the Street Signals and Pedestrian Signals Point layer (Signals turned on only). If the feature intersects with the 100' Buffer Polygon layer, the SIGNAL_INTERSECTION field is coded to Yes, otherwise No.

  • If a feature is moved after it is created, the SIGNAL_INTERSECTION field will automatically update.

  • The SIGNAL_INTERSECTION field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule.

  • Triggers - Insert, Update

  • Execution - Exclude application evaluation

var fcSignalBuffer = FeatureSetByName($datastore, "Signals_Turned_On_100ft_Buffer", ["OBJECTID"]);
var fcSignalBufferInt = Intersects(fcSignalBuffer, $feature);
var SignalBuffer = First(fcSignalBufferInt);

if (SignalBuffer == null) {
return "N"
}
else
return "Y";

School

  • All Markings GIS layers except Markings Long Line have a SCHOOL field, which is automatically calculated based on a 1/4 mile Buffer of the Schools layer located on MAINT. If the feature intersects the layer on creation, the SCHOOL field is calculated to Yes, otherwise No.

  • If there are other stipulations for changing the value, the field is editable and can be changed.

  • Triggers - Insert

  • Execution - Exclude application evaluation

var fcSchoolBuffer = FeatureSetByName($datastore, "Schools_1_4_Mile_Buffer", ["OBJECTID"]);
var fcSchoolBufferInt = Intersects(fcSchoolBuffer, $feature);
var SchoolBuffer = First(fcSchoolBufferInt);

if (SchoolBuffer == null) {
return "N"
}
else
return "Y"

// This Rule will be modified after there is a good School Zone Beacons layer.

Bike - Specialty Line

  • The BIKE field in the Markings Specialty Line Layer is automatically calculated based on the SPECIALTY_LINE_TYPE field in the same layer.

  • If the SPECIALTY_LINE_TYPE field is edited after it is created, the BIKE field will be updated depending on the change made.

  • The BIKE field is not manually editable. If the SPECIALTY_LINE_TYPE field is changed by accident, the BIKE field will automatically update based on the Attribute Rule.

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

if ($feature.SPECIALTY_LINE_TYPE == 'DELINEATORS') {
return 'Y'
}
else if ($feature.SPECIALTY_LINE_TYPE == 'CONCRETE_DOMES') {
return 'Y'
}
else {
return 'N' }

Bike - Specialty Point

  • The BIKE field in the Markings Specialty Point Layer is automatically calculated based on the SPECIALTY_POINT_TYPE and SPECIALTY_POINT_SUB_TYPE fields.

  • Since there are 6 different Subtypes, 6 separate rules had to be created to correctly calculate the BIKE field depending on which Specialty Point Type is chosen.

  • If the SPECIALTY_POINT_TYPE or SPECIALTY_POINT_SUB_TYPE fields are edited after the record is created, the BIKE field will be updated depending on the change made.

  • The BIKE field is not manually editable. If either the SPECIALTY_POINT_TYPE or SPECIALTY_POINT_SUB_TYPE fields are changed by accident, the BIKE field will automatically update based on the Attribute Rules.

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

Specialty Point Type

Description

1

Word

2

Arrow

3

Symbol

4

Parking

5

Other

6

Raised Pavement Markings

Word

  • Attribute Rule Subtype: Word

Specialty Point Subtype for BIKE - Word

Description

14

Bike (word)

if ($feature.SPECIALTY_POINT_SUB_TYPE == 14) {
return 'Y'
}
else {
return 'N'
}

Arrow

  • Attribute Rule Subtype: Arrow

Specialty Point Subtype for BIKE - Arrow

Description

11

Bike Arrow

if ($feature.SPECIALTY_POINT_SUB_TYPE == 11) {
return 'Y'
}
else {
return 'N'
}

Symbol

  • Attribute Rule Subtype: Symbol

Specialty Point Subtype for BIKE - Symbol

Description

1

Bicycle (Bike)

3

Bicyclist

5

Chevron

if ($feature.SPECIALTY_POINT_SUB_TYPE == 1) {
return 'Y'
}
else if ($feature.SPECIALTY_POINT_SUB_TYPE == 3) {
return 'Y'
}
else if ($feature.SPECIALTY_POINT_SUB_TYPE == 5) {
return 'Y'
}
else {
return 'N'
}

Other

  • Attribute Rule Subtype: Other

Specialty Point Subtype for BIKE - Other

Description

1

Green pad

2

Green launch pad

if ($feature.SPECIALTY_POINT_SUB_TYPE == 1) {
return 'Y'
}
else if ($feature.SPECIALTY_POINT_SUB_TYPE == 2) {
return 'Y'
}
else {
return 'N'
}

Parking

  • Attribute Rule Subtype: Parking

Specialty Point Subtype for BIKE - Parking

Description

7

Bicycle

if ($feature.SPECIALTY_POINT_SUB_TYPE == 7) {
return 'Y'
}
else {
return 'N'
}

Raised Pavement Markings

  • Attribute Rule Subtype: Raised Pavement Markings

Specialty Point Subtype for BIKE - Raised Pavement Markings

Description

None

None

if ($feature.SPECIALTY_POINT_TYPE == 6) {
return 'N'
}

Other Area

  • All Markings GIS layers except the Markings Long Line layer have an OTHER_AREA field, which is automatically calculated based on specific fields depending on the layer.

  • If any changes are made to any of the fields that affect the OTHER_AREA field, it will automatically update as well.

  • The OTHER_AREA field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule.

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

Short Line

  • The OTHER_AREA field is calculated based on the CBD, SIGNAL_INTERSECTION, and SCHOOL fields.

  • If CBD, SIGNAL_INTERSECTION, or SCHOOL fields are coded to Yes, then OTHER_AREA will automatically be coded to No. If all are No, then OTHER_AREA will be coded to Yes.

if ($feature.CBD == 'Y') {
return 'N'
}
else if ($feature.SIGNAL_INTERSECTION == 'Y') {
return 'N'
}
else if ($feature.SCHOOL == 'Y') {
return 'N'
}
else {
return 'Y'
}

Specialty Line / Point

  • The OTHER_AREA field is calculated based on the CBD, SIGNAL_INTERSECTION, and BIKE fields.

  • If CBD, SIGNAL_INTERSECTION, or BIKE fields are coded to Yes, then OTHER_AREA will automatically be coded to No. If all are No, then OTHER_AREA will be coded to Yes.

if ($feature.CBD == 'Y') {
return 'N'
}
else if ($feature.SIGNAL_INTERSECTION == 'Y') {
return 'N'
}
else if ($feature.BIKE == 'Y') {
return 'N'
}
else {
return 'Y'
}

Crew Assigned

  • All Markings GIS layers except the Markings Long Line layer have a CREW_ASSIGNED field, which is automatically calculated based on specific fields depending on the layer.

  • If any changes are made to any of the fields that affect the CREW_ASSIGNED field, it will automatically update as well.

  • The CREW_ASSIGNED field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule.

  • The CREW_ASSIGNED field is calculated by the following hierarchy:

    • CBD

    • SIGNAL_INTERSECTION

    • SCHOOL or BIKE

    • OTHER_AREA

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

Short Line

  • The CREW_ASSIGNED field is calculated based on the CBD, SIGNAL_INTERSECTION, SCHOOL, and OTHER_AREA fields. The hierarchy for which the CREW_ASSIGNED field is coded is listed above.

if ($feature.CBD == 'Y') {
return 'CBD'
}
else if ($feature.SIGNAL_INTERSECTION == 'Y') {
return 'SIGNAL'
}
else if ($feature.SCHOOL == 'Y') {
return 'SCHOOL'
}
else if ($feature.OTHER_AREA == 'Y') {
return 'OTHER'
}
else {
return $feature.CREW_ASSIGNED
}

Specialty Line / Point

  • The CREW_ASSIGNED field is calculated based on the CBD, SIGNAL_INTERSECTION, BIKE, and OTHER_AREA fields. The hierarchy for which the CREW_ASSIGNED field is coded is listed above.

if ($feature.CBD == 'Y') {
return 'CBD'
}
else if ($feature.SIGNAL_INTERSECTION == 'Y') {
return 'SIGNAL'
}
else if ($feature.BIKE == 'Y') {
return 'BIKE'
}
else if ($feature.OTHER_AREA == 'Y') {
return 'OTHER'
}
else {
return $feature.CREW_ASSIGNED
}

School Name

  • Only the Markings Short Line layer has a SCHOOLNAME field, which is automatically calculated based on a 1/4 mile Buffer of the Schools layer located on MAINT. If the feature intersects the layer on creation, the SCHOOLNAME field is calculated based on the SCHOOL_NAME field in the 1/4 mile Buffer of the Schools layer.

  • If there are other stipulations for changing the value, the field is editable and can be changed.

  • Triggers - Insert

  • Execution - Exclude application evaluation

var fcSchool = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.Schools_1_4_Mile_Buffer", ["SCHOOL_NAME"]), $feature);
var fcSchoolFirst = First(fcSchool);

if (fcSchoolFirst == null) {
return ""
}
else
return fcSchoolFirst.SCHOOL_NAME

High Injury Network

  • All layers except the Markings Long Line layer have a HIN field, which is automatically calculated based on the High Injury Network Combined layer located in MAINT. If the feature is within a specified buffer distance, the HIN field is calculated to Yes, otherwise No.

  • Since each buffer is not perfect for calculating 100% of the features, the field is editable and can be changed.

  • Triggers - Insert

  • Execution - Exclude application evaluation

Short Line

  • The Short Line buffer is large as all features located at an intersection where one or both streets are on the High Injury Network are calculated to Yes on the HIN field

var HinIntLayer = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.High_Injury_Network_Combined", ['OBJECTID'], true), Buffer($feature, 100, 'feet'));
var HinInt = First(HinIntLayer);

if (HinInt == null) {
return "N"
}
else
return "Y";

Specialty Line / Point

  • The attribute rule for calculating the HIN field for Specialty Line and Point is identical

var HinIntLayer = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.High_Injury_Network_Combined", ['OBJECTID'], true), Buffer($feature, 50, 'feet'));
var HinInt = First(HinIntLayer)

if (HinInt == null) {
return "N"
}
else
return "Y";

Last updated