[GIS] Extracting data from a raster to a polyline based on start and end points

arcgis-10.1attribute-tablelineraster

enter image description here

I have a polyline shapefile with the attributes seen above.

startx and starty represent the coordinates of the beginning of each segment of a polyline.
endx and endy represent the coordinates of the end of each segment of a polyline.

I have a raster with values of Flow Accumulation, known as FA.

I would like to extract the values on the raster at the coordinates of the start points and place them in this attribute table at "StartFA" and at the end points and place them in this attribute table at "EndFA".

I have so far performed "Feature Vertices to Points" using point types "START" and "END".
I then performed "Extract Values to Points".

How do I put the values I am looking for into my polyline shapefile attribute table?

I am using ArcGIS 10.1 with an ArcInfo license.

Best Answer

If I understand your question correctly, I run something similar on occasion for stormwater lines. It involves extracting depths at each endpoint and adding them to the table of the lines.

What you can do is create your own Unique ID's based off of the XY coordinates of both sources and then use those to join the tables together. You would end up doing two joins, one for the startFA and one for the endFA.

Add new fields called startFAXY and endFAXY in your lines table. Populate those by concatenating your coordinates of start and end. The startFAXY of FID0 would be "-76.350441, 45.434355". Run this same procedure on endFAXY. Then, continue this same process on your extracted values FA table so that you have a column that concatenates your FA table coords. Use these concatenated XY values as a unique ID to join the two sources together (lines table + FA table) and populate the field. The first join (startFAXY + FA table) would populate the startFA field. The second join (endFAXY + FA table) would populate the endFA field.

Using the example from above, FID0 startFAXY -76.350441, 45.434355 would join to a record in the FA table with a concatenated "ID" of -76.350441, 45.434355.

It is generally not perfect since it deals with coordinates, but I find I am able to capture >98% so any manual matching is not too bad. Add in the use of the Attribute Transfer Tool during cleanup/QA and it really reduces the headache.