[GIS] Intersect, Spatial Join?: One Line crossing Multiple Polygons, assigned wrong attribute

arcgis-desktopintersectionlinepolygonspatial-join

I am looking for any possible solutions to a problem I am encountering with ArcGIS.

I am using census block groups (CBG) to assign streets an income level value based on their location within the CBGs. I have tried using the intersect method which alleviates the problem but creates another in that it now splits the streets at the boundary of census block groups rather than at intersections as needed (need to keep them whole).

If I use spatial join, it keeps the street lines in their original form but in many instances (data with over 40,000 streets) they are being assigned the wrong attributes.

For example, in the images attached, a small portion of the street is located in a higher income CBG (yellow) with the majority being located a the lower income CBG (green). Using spatial join (match option: intersect), the street is assuming the attributes of the higher income (yellow).

Is there any method for running a spatial join (or other tool) that will assign attributes of a single polygon category (ex. Low income) to lines (streets) based on having the majority of their length in a single polygon when it is contained in two or more different polygons with varying attributes?

TLDR: (using image example): spatial join is assigning yellow polygon attributes to street though only a small portion of the line is within it. I am looking for a way to have attributes of any polygons joined to any lines which have their greatest majority within them (ex. green would be assigned to street not yellow) I could do this manually, however I need to ensure this will be done accurately for all 40,000 streets.

Line in question

Zoomed

Best Answer

I see two options:

  1. Ensure that your line dataset has a unique id field. Intersect the lines and polygons. Calculate the lengths of the output lines. Select the record with the max length for each line id. Delete all other lines (switch selection and delete). Table join the max length lines to original lines using the unique id. Field calculator to populate the census block field from joined table. Remove join.
  2. Spatial join the polygons to the lines and use the match option as 'Have their center in'.

Method 1 will be more accurate, method 2 will be faster.

Related Question