I have two feature classes. I need to transfer attributes from a point feature class to a line feature class based on a combination of fields. They do not have matching field names. Here is an example of what I want to compare between my SearchCursor dictionary and my UpdateCursor table:
if row[0] in intdict AND row[2] in intdict != row[2] AND row[3] in intdict == row[3] AND row[4] in intdict = row[4] THEN row[6] = row[1] in intdict
intdict = {row[0]:row[1:] for row in arcpy.da.SearchCursor(interSectPts,['FID_ADDRSTAND','STREET', 'POINT_X','POINT_Y'])}
with arcpy.da.UpdateCursor(addrLyr,['FID_ADDRSTAND','STREET','STARTX_2','STARTY_2', 'ENDX_2', 'ENDY_2','FROM_','TO_']) as cursor:
for row in cursor:
if (row[0] in intdict):
update row with value
update row with value
update row with value
etc.....
To add context, I am changing the values of a road segment in the TO_ and FROM_ columns to show the street names of intersecting roads. For example a segment named 'Main St' could intersect '1st st' on the west end and '2nd st' on the east end...thus the attribute table would look like:
STREET | FROM_ | TO_
Main St | 1st St | 2nd St
I basically an comparing the x,y coordinates of the intersection point feature class and its street names with the x,y of the starting and ending coordinates of street segments. When an intersection occurs, I am grabbing the values of the street name. My primary question is how to structure my 'if' in the update cursor...the rest, I feel like I could do....