Tengo puntos a lo largo de una línea. Puntos que se cruzan con el segmento de la línea para devolver información de atributos. Mi línea como tres segmentos conectados.
disjoint (second_geometry) Indica si la base y la comparación no tienen puntos en común. Dos geometrías se cruzan si disjoint devuelve 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
Resultado:
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
¿Qué me falta?