Complex Attribute Transfer using Spatial Analysis in Python.

1502
2
03-25-2013 02:12 PM
AbdulRauf
New Contributor
Dear GIS professionals

I am in need of your professional assistance in completing a hectic job.

I've two feature classes named

1)IRI
2)Lanes

Lanes represents the lanes of each road and main attribute are its unique id "LID" a number field and "Type" is text field with values "L","M","R" representing, Left, Right and Middle lane.

IRI feature class has over 1 million records for each lane Type. This layer does not have LID with to properly join the two layers (Thanks to Survery Dept.) only common field is Type. Which cannot be used to join the tables.

Now here is problem for me i want to add LID in "IRI" feature class for each point using spatial analasis in python. Code should do something like this....

Loop through Points from "IRI"
     ----->select a point check its Lane Type
     ----->Find same Lane Type in "Lanes" within a distance of 3 meters.........(3m because the both layers have a spatial shift)
     ----->Get LID of that Lane and Put in LID field of "IRI" table.
Next Point.

I need this on urgent basis so please run your brain horses....
Tags (2)
0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor
It seems like you might be able to just do a Spatial Join.
0 Kudos
AbdulRauf
New Contributor
Thanks for the direction and almost there

BUT....IN this option where i will define that Point of Lane "L" should join the nearest Lane of type "L"....

As if the point of lane "L" is in between Lane "L" and "R" it should join "L" even being near to "R" cause i said earlier there is shift between two feature calsses and it not uniform.

Regards.
0 Kudos