Solved! Go to Solution.
Hello,
I have an "Intersections" point layer that I intersected with my street center-line file with the goal of getting the street names and classifications of the streets which form the intersection. The result is a point layer with a point at the intersection for each of the road segments that form the intersection. So, for instance, a four way intersection of Polk St and 30th St will have four points. Two for Polk and two for 30th Streets, the difference being the street segment ID.
How do I combine those four points into one point that holds all the attribute information? I need the point to include all the street names that come into it, and the classifications as well, but I'm stuck with having all that in multiple points right now.
Thanks!
I have adapted Mike Hargrave's method for creating a single point per intersection with all associated street names. Since you have already done the intersect part to get the points for each segment I have left that part out.
1) Calculate X and Y values on the points that have the Street information into two double fields using Calculate Geometry.
2) Add a DissolveID text field and calculate a concatenation of your X and Y fields in the form: X_Y
3) Dissolve on DissolveID field to end up with only one point per intersection and just the field DissolveID value.
4) Do a Spatial Join with your target being the intersection points that only contain a DissolveID field, and the Join Features being the undissolved points that still have all of the Street information. Make sure you use the JOIN_ONE_TO_ONE option.
In the Spatial Join Tool right click on any field that you want to have every value retained in the "Field Map of Join Features" window and choose Properties. In the property window set the Field Type to Text. Increase the number of characters allowed to something like 200 so that there is room for all Street Names (less for short text values and most numbers and dates). Set the Merge Rule to Join. Add a Delimiter of "_".
5) Run the Spatial Join tool. All street segments at the intersection will be included. Your end result in the Street Name field should look something like "Polk St_Polk St_30th St_30th St" and your Type field should look like "Maintained_Not Maintained_Not Maintained_Maintained". The Street Name and Type order will be in whatever order the points are read, but they will correspond to each other. I believe that if you want them in a certain alphabetical order you would have to first permanently sort the points (Sort tool if you have ArcInfo or Criss Snyder's Permanently Sort Features tool").
If you only want each name to appear once (and I think in alphabetical order) do another Dissolve of all of the segment points and only keep DissolveID and Street Names values (do not keep the type if you want to avoid repeats). When you Spatially Join this second Dissolve with the Dissolve of Step 3 it will only have each Street Name appear once and be in sorted order, resulting in "30th St_Polk St". keep the Count in a Text field so that you can get "2_2", telling you it is a 4 way intersection with each Street Name having 2 segments.
6) Use Field calculator to replace the "_" character with " & " - set the Parser to Python, then use the following: !YourFieldName!.replace('_',' & '). Your final street combination will look like "Polk St & Polk St & 30th St & 30th St" your Type combination would look like "Maintained & Not Maintained & Not Maintained & Maintained" if you wanted to keep correspondence between each segmentIDs Street Name and Type association.
If you only wanted unique Street Name combinations and did the second Dissolve on Street Names then the result would be "30th St & Polk St"
7) If you did the only use each name once option and a point does not contain the " & " characters, it is either a continuation of the street with a node (Count would be "2" or more if you joined its values from the Dissolve) or a Cul-de-Sac, Stub Street, or Topological Error (Count would be 1 if you joined its values from the Dissolve).
See the screen shot for a typical Spatial Join tool set up, Field Property set up, and result. In this case I joined all of the points from every segment and did not sort the points prior to doing the Spatial Join.
This worked well, thank you! I was unaware of the field Properties in the Join dialog. Much appreciated information!
I have adapted Mike Hargrave's method for creating a single point per intersection with all associated street names. Since you have already done the intersect part to get the points for each segment I have left that part out.
1) Calculate X and Y values on the points that have the Street information into two double fields using Calculate Geometry.
2) Add a DissolveID text field and calculate a concatenation of your X and Y fields in the form: X_Y
3) Dissolve on DissolveID field to end up with only one point per intersection and just the field DissolveID value.
4) Do a Spatial Join with your target being the intersection points that only contain a DissolveID field, and the Join Features being the undissolved points that still have all of the Street information. Make sure you use the JOIN_ONE_TO_ONE option.
In the Spatial Join Tool right click on any field that you want to have every value retained in the "Field Map of Join Features" window and choose Properties. In the property window set the Field Type to Text. Increase the number of characters allowed to something like 200 so that there is room for all Street Names (less for short text values and most numbers and dates). Set the Merge Rule to Join. Add a Delimiter of "_".
5) Run the Spatial Join tool. All street segments at the intersection will be included. Your end result in the Street Name field should look something like "Polk St_Polk St_30th St_30th St" and your Type field should look like "Maintained_Not Maintained_Not Maintained_Maintained". The Street Name and Type order will be in whatever order the points are read, but they will correspond to each other. I believe that if you want them in a certain alphabetical order you would have to first permanently sort the points (Sort tool if you have ArcInfo or Criss Snyder's Permanently Sort Features tool").
If you only want each name to appear once (and I think in alphabetical order) do another Dissolve of all of the segment points and only keep DissolveID and Street Names values (do not keep the type if you want to avoid repeats). When you Spatially Join this second Dissolve with the Dissolve of Step 3 it will only have each Street Name appear once and be in sorted order, resulting in "30th St_Polk St". keep the Count in a Text field so that you can get "2_2", telling you it is a 4 way intersection with each Street Name having 2 segments.
6) Use Field calculator to replace the "_" character with " & " - set the Parser to Python, then use the following: !YourFieldName!.replace('_',' & '). Your final street combination will look like "Polk St & Polk St & 30th St & 30th St" your Type combination would look like "Maintained & Not Maintained & Not Maintained & Maintained" if you wanted to keep correspondence between each segmentIDs Street Name and Type association.
If you only wanted unique Street Name combinations and did the second Dissolve on Street Names then the result would be "30th St & Polk St"
7) If you did the only use each name once option and a point does not contain the " & " characters, it is either a continuation of the street with a node (Count would be "2" or more if you joined its values from the Dissolve) or a Cul-de-Sac, Stub Street, or Topological Error (Count would be 1 if you joined its values from the Dissolve).
See the screen shot for a typical Spatial Join tool set up, Field Property set up, and result. In this case I joined all of the points from every segment and did not sort the points prior to doing the Spatial Join.