Add To and From Intersecting Streets to Attribute table of Streets

3214
5
Jump to solution
12-10-2015 07:24 PM
PaulMcBride
New Contributor III

Hello!

I have a street layer that I am wanting to have 2 fields for cross streets at the beginning and the end of the line feature.  I can create intersection points with no problems but we have the need to get the intersecting roads for each line in the same database.

Example.

I have a line for "8th Street" from "Main St" to "Meridian St".  I would like "Main St" in field1 "Cross Street A" and "Meridian St" in field2 "Cross Street B".

Any suggestions?

Thank you so much!

Paul

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RichardFairhurst
MVP Honored Contributor

Do your lines split at every intersection?  Do they end exactly on an intersection point when they are supposed to terminate at an intersection or are they poorly controlled for topology?

Anyway, if the line ends match with the intersection location you can do the following.  Calculate the concatenation of the intersection and line end XY values into their own text fields.  Separate the coordinates with a delimiter such as a semi-colon or enclosed in brackets.  I avoid using comma delimiters due to possible issues when using some tools.  Then you can do separate joins for each line end field to match the intersection field and transfer the intersection names to the line.

A calculation I use for my California State Plane US Feet projection is:

Parser:  Python

Show Codeblock: Checked

Pre-logic Script Code:

def Output(FirstPoint):

  FPX = round(float(FirstPoint.X), 4)

  FPY = round(float(FirstPoint.Y), 4)

  return "{%(FX)012.4f}{%(FY)012.4f}" % {'FX': FPX, 'FY': FPY}

Expression for intersection point:  Output(!Shape.CENTROID!)

Expression for Line From End point:  Output(!Shape.FIRSTPOINT!)

Expression for Line To End point:  Output(!Shape.LASTPOINT!)

This produces a text value representing the coordinate that can be joined that looks like:  "{6258470.7700}{2243243.1950}"

View solution in original post

5 Replies
PaulMcBride
New Contributor III

I have used this tool and the intersections are great, but I need to get those point features back into my line segment.  Any thoughts?

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Not sure what you mean by get back into, but if you are referring to the attributes, an attribute or spatial join might be the way to go or a relate if it is a many to one, or perhaps an intersect Intersect—Help | ArcGIS for Desktop depending on the desired tabular output needed.

0 Kudos
RichardFairhurst
MVP Honored Contributor

Do your lines split at every intersection?  Do they end exactly on an intersection point when they are supposed to terminate at an intersection or are they poorly controlled for topology?

Anyway, if the line ends match with the intersection location you can do the following.  Calculate the concatenation of the intersection and line end XY values into their own text fields.  Separate the coordinates with a delimiter such as a semi-colon or enclosed in brackets.  I avoid using comma delimiters due to possible issues when using some tools.  Then you can do separate joins for each line end field to match the intersection field and transfer the intersection names to the line.

A calculation I use for my California State Plane US Feet projection is:

Parser:  Python

Show Codeblock: Checked

Pre-logic Script Code:

def Output(FirstPoint):

  FPX = round(float(FirstPoint.X), 4)

  FPY = round(float(FirstPoint.Y), 4)

  return "{%(FX)012.4f}{%(FY)012.4f}" % {'FX': FPX, 'FY': FPY}

Expression for intersection point:  Output(!Shape.CENTROID!)

Expression for Line From End point:  Output(!Shape.FIRSTPOINT!)

Expression for Line To End point:  Output(!Shape.LASTPOINT!)

This produces a text value representing the coordinate that can be joined that looks like:  "{6258470.7700}{2243243.1950}"

View solution in original post

PaulMcBride
New Contributor III

Thank you all for the help.  I found a pdf documenting directions to follow.  It is titled, "Finding Street Segments" and it piggy backs off of this article.

Thanks for the help!!!

0 Kudos