Topology rule: points must not be covered by lines.

606
6
02-05-2021 01:02 PM
Status: Open
Labels (1)
MarkVolz
Regular Contributor

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!

6 Comments
JoshuaBixby

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?

AmirBar-Maor

I think both cases can be achieved using Attribute Rules Validation rules.

MarkVolz

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!

 

 

KoryKramer

That could be a good question for the Attribute Rules place.

AmirBar-Maor

@MarkVolz 

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

 

 

 

MarkVolz

Amir,

I appreciate your help.  your code and video will be very useful!

Thank You