I need to create an attribute rule that would populate what community a road centerline falls into. For the most part, a centerline falls wholly within a community, so right and left of the line will have the same community, but some centerlines run along the boundary, and have different values for community on the left and the right. The centerline should be split whenever it crosses a boundary (so there are ever only one or two communities that a properly digitized centerline would intersect). I can write the regular case (expecting just one community in the collection) and outputting an error when the line falls wholly outside a community or there are more than two communities in a collection: var polyField = FeatureSetByName($datastore, "COMMUNITIES", ["COMMUNITY"]) var polyFeatures = Intersects(polyField, $feature) if (Count(polyFeatures)=1){ var polyFeature = First(polyFeatures); return polyFeature.COMMUNITY} else if (Count(polyFeatures)>2) or (Count(polyFeatures)<1)) { <RETURN ERROR HERE>} What I really need, however, is to figure out what community lies to the left and which one to the right of the digitized direction of the centerline when there are two communities in the collection. Is there a way to do that in Arcade?
... View more