I have points along along a line. Points that intersect the segment of the line to return attribute information. My line as three connected segments.
disjoint (second_geometry) Indicates if the base and comparison geometries share no points in common. Two geometries intersect if disjoint returns False.
with arcpy.da.UpdateCursor(in_point_along_line, ["SHAPE@", "Azimuth", "OID@"]) as cursor:
for row in cursor:
azimuth = get_azimuth_intersect(row[0], row[2])
row[1] = azimuth
def get_azimuth_intersect(in_geom, id):
for geom in in_geom_azimuth_list:
if in_geom.disjoint(geom[0]) is False:
print id
print in_geom.centroid
print "Intersect"
print geom[0].firstPoint
print geom[0].lastPoint
print geom[0].length
Result:
This one is reporting False, and is correct the point does intersect the line segment.
252501.7229 5653692.1437 NaN NaN The Point
252657.6907 5653761.9575 NaN NaN The line firstpoint
251107.9884 5653068.2849 NaN NaN The line lastpoint
The one is reporting it's also False? But it does not intersect...
252501.7229 5653692.1437 NaN NaN The Point
251107.9884 5653068.2849 NaN NaN The line firstpoint
251169.5741 5652467.8243 NaN NaN The line lastpoint
The one is reporting it's also False? But it does not intersect...
252501.7229 5653692.1437 NaN NaN The Point
251169.5741 5652467.8243 NaN NaN The line firstpoint
250415.1493 5651836.5709 NaN NaN The line lastpoint
What am I missing?