Is there a tool in ArcToolbox that can do what is illustrated in the accompanying image? I could have sworn there was.
Given you are using road centerlines and map sheets you could use a spatial join, and the merge rule for the attributes. This function allows to list the attribute values from a particular field (of the feature class that you’re joining to the target layer) and enter them into a designated field using a user-defined delimiter.
The resulting dataset should display pages that each of the roads intersect, stored as text values separated by the delimiter of your choice.
There is no control on which order the fields are merged up. So you will possibly need to run a sort on the field containing the merged attributes. You could use something like this.
def sortValues(the_value, delimiter=','): if the_value == None: return the_value # Create a Python list by splitting the string on the delimeter # the_list = the_value.split(delimiter) # Sort the list # the_list.sort() # Reassemble the string from the sorted list # rval = delimiter.join(the_list ) return rval
Dissolve should do it.. or Summary Statistics.
I've looked at both but not seeing how to get the comma delimited valued in the second column.
a similar output with a... Pivot Table—Data Management toolbox | ArcGIS Desktop
Not sure that will work either.
What I'm trying to do create a road name index for a data driven pages map book. So, I've got a map book with 300 pages and I'd like to create an index that has two fields... "road name" and "pages". Examples might be " Highway 14" "10,11,12,15,16,17"
"College Ave" "25,29,100,200...etc.".
I took my road centerlines and dissolved based on name. Then I did an intersect to break the roads at the page boundaries, then I did a spatial join to add the page fields onto the road centerlines. So far so good. But now, I have individual rows for each page that any given road shows up on. I'd like to merge all those so that the road name only shows up in one record but the pages it's on are all together in a comma delimited string in the second column, pretty much just like that image I attached in my original post. The crazy thing is, I did all this once before months ago and now I can't figure out what the tool was that did it.
Bingo, that's it! Thanks so much.
Retrieving data ...