It would be useful to add a topology rule so that points must not be covered by lines. This rule could verify that address points are not covered by a road, which should be invalid because the address point must be on one or the other side of the road.
In addition, it might be useful to also add a rule so that lines may not be inside multiple polygons. This could be useful to make sure a road that has a state name does not fall inside multiple states. *Note I am not sure if the rule "must be inside" applies to any polygon or just a single polygon.
Thanks!
In order for a line to cover a point, it must intersect the point, so why not just set a rule for does not intersect?
I think both cases can be achieved using Attribute Rules Validation rules.
Amir,
Interesting. I had thought that the attribute rules were only for attributes and not geometry. Would you be willing to put together a quick example showing how we can validate geometry?
Thanks!
That could be a good question for the Attribute Rules place.
Assuming you know how to set an attribute rule and a bit of Arcade here are the expressions.
For points "MUST NOT BE COVERED BY LINE"
var roadsFS = FeatureSetByName($datastore,'StateRoad', [''], false); //access the lines feature class. Returns a feature set
var BufferedPoint = Buffer($feature, 1, 'meter'); //buffer a given point feature. Return a polygon
return (Count(Intersects(roadsFS, BufferedPoint)) == 0);
For lines 'MUST BE IN ONE STATE'
var StatesFS = FeatureSetByName($datastore,'States', [''], false); //access the state polygon feature class. Returns a feature set
return (Count(Intersects(StatesFS, $feature)) == 1);
I also made a short video to help you and others get started:
There are many videos and resources to help you getting started with Attribute Rules (and Arcade).
I hope this helps you and others to get started
Amir
Amir,
I appreciate your help. your code and video will be very useful!
Thank You
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.