The Address Data Management solution can be used by mapping technicians to maintain an inventory of road centerlines, valid road names, site addresses, and related mailing addresses.The solution includes an ArcGIS Pro project with a schema database and feature classes pre-configured with attribute rules to help automate and ensure the integrity of you addresses and centerlines while editing.
One capability that isn't included by default but can be configured in the solution is the ability to pull information from an intersecting feature when a new address is created or moved. For example, you might want to pull the name of the municipality, the zip code, or the property identification number (PIN) the address falls within and write it to a field within the site address point. This involves adding a new attribute rule to the Site Addresses feature class.
To add an attribute rule to your site addresses layer and pull information from an intersecting feature complete the steps below. It is important to note this rule requires both the addresses feature class and the feature class you want to pull the intersecting feature from be in the same database.
// replace 'FeatureClassName' with the name of the feature class to pull intersecting features from (ex. Cities, ZipCodes, Parcels)
var intersectingFeatures = Intersects(FeatureSetByName($datastore, "FeatureClassName"), $feature);
for (var feature in intersectingFeatures) {
// replace 'fieldname' with the name of the field from the intersecting feature to pull the value from
var value = feature.fieldname;
if (IsEmpty(value)) continue;
return value;
}
return null;
The rule should now be active, when you create a new site address point the rule should run and pull the attribute of the intersecting feature into the field specified by the rule. You could repeat the steps above to add additional rules for different feature classes and field values.
The code above is configured to return null if no intersecting features are found and if multiple intersecting features are found (overlapping polygons) it will return the first non null feature attribute found. Below are some additional code samples for some other common scenarios.
// replace 'FeatureClassName' with the name of the feature class to pull intersecting features from (ex. Cities, ZipCodes, Parcels)
var intersectingFeatures = Intersects(FeatureSetByName($datastore, "FeatureClassName"), $feature);
var values = [];
for (var feature in intersectingFeatures) {
// replace 'fieldname' with the name of the field from the intersecting feature to pull the value from
var value = feature.fieldname;
if (IsEmpty(value)) continue;
values [Count(values )] = value;
}
return Concatenate(values, ", ");
// replace 'FeatureClassName' with the name of the feature class to pull intersecting features from (ex. Cities, ZipCodes, Parcels)
var intersectingFeatures = Intersects(FeatureSetByName($datastore, "FeatureClassName"), $feature);
var values = [];
for (var feature in intersectingFeatures) {
// replace 'fieldname' with the name of the field from the intersecting feature to pull the value from
var value = feature.fieldname;
if (IsEmpty(value)) continue;
values[Count(values)] = value;
}
return Mean(values);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.