5

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

3
  • Have you read through the spatial join docs to see if any other match options would be suitable? Also, do all the census boundaries correspond to streets (it appears so in this small image example)? If that's the case, you could use topology to line them up together. Then you'd have to come up with how to deal with lines on boundaries (possibly in spatial join).
    – Tangnar
    Jan 13, 2016 at 19:34
  • I just tried another method - "HAVE_THEIR_CENTER_IN" and in theory, will use the polygon that the line has the majority of it's length in. It is not a perfect solution as some roads weave in and out (may be corrected by your advised topology solution) but that appears to be a rare instance. Thanks for getting my brain working. I knew there were other methods but had not considered that if a line has its center in a polygon and it is not one of the rare curvilinear winding streets, it will likely be contained at minimum 50.001% within the polygon. Thanks again.
    – Paul
    Jan 13, 2016 at 20:21
  • And if it winds in and out, it's probably doesn't really matter which one the center ends up in. If it turns out it does, you could try simplifying the streets to remove some vertices.
    – Tangnar
    Jan 13, 2016 at 20:24

2 Answers 2

1

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.

0

See the Spatial Join Largest Overlap tool which can be downloaded here: https://www.arcgis.com/home/item.html?id=e9cccd343bf84916bda1910c31e5eab2

"This tool presents a new spatial relationship, Largest Overlap, where a target feature is joined to the join feature with the largest area or length of overlap."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.