I want to use attribute rules to transfer an attribute from lines to points based on which end of the line a point intersects.
I have a set of Flow Meter Points that intersect Pipe Lines.
They are digitized such that the first vertex in each line is the "upstream" end and the last vertex is the "downstream" end.
A given Flow Meter always intersects both a downstream end of a pipe and an upstream end of a pipe
I wish to get the incoming and outgoing diameter from the pipes to the meters.
The end vertex of a pipe that intersects a meter represents the incoming pipe diameter.
the start vertex of a pipe that intersects a meter represents the outgoing pipe diameter.
I have previously worked out how to transfer attributes from a point (manhole) to a line (pipe) as follows:
var g = Geometry($feature);
var ToDMHPointGeometry = g.paths[-1][-1];
var fsDMHPoint =FeatureSetByName($datastore, "Drainage_Manholes", ["out_invert"], false);
var ToDMHPoint = First(Intersects(fsDMHPoint, ToDMHPointGeometry ) )
if (ToDMHPoint != null) return ToDMHPoint.out_invert;
The reverse - lines to points - is eluding me given that I need to test for the end of the line which intersects the Flow Meter Point.