I'm using ArcGIS Desktop 10.2 and I'd like to take roads in a network shorter than a certain length and append them to an adjacent street section. Currently the road network files are split intersection to intersection which creates awkwardly small segments.
Could you suggest ways of automating the process to select all roads under a certain length and append them to an adjacent street section?
Calculate field REC using [fid]+1 in segments table Export your short segments to separate feature class. Export the rest to another one.
Remove from result segments with same REC, "REC" = "REC_1". Remove from result segments with different names, "RDID" <> "RDID_1". Sort it by the length of longest long segment:
Remove duplicates (not first) in long segment names.
Calculate additional field combo, by concatenating ([FID]+1) and road name
Make sure to use good separator, e.g “;” so you can split this field later to define road name.
Transfer value of COMBO field back to original table using 2 joins original [REC]to[REC] and original [REC]to[REC_1]
Dissolve original using that field.
Replace selected by dissolved only after computing road name in dissolved. This will join short segment to the shortest same name neighbour segment:
Do the green and blue roads have similar attributes (e.g. same road name)? Does it matter if the target blue segment is merged with the road above it and/or below it? The solution will probably involve the Unsplit Line tool. Give it a try and see how it goes. A pseudo-workflow would be something like:
1) Select by Attribute all roads under a certain length - use the SHAPE_LENGTH field or something.
2) Select by Location all roads that intersect your previous selection in #1, recursing your previous selection back against itself. This selects both your short segments and the neighboring segments you want to merge. Export this subset to a new feature class. Then delete these same subset lines from your original data.
3) Run the Unsplit Line tool on your exported subset, specifying your "Road Name" as the dissolve_field, and/or any other fields whose values you want to assert as identical.
4) Data Load results back in your original data.
Assuming the data is in a .gdb, but a similar method can be done with shapefiles, coverages, etc. Also assume you have Advanced license access; Unsplit Line isn't available otherwise.
Well a good way to automatize any process in ArcGis is programming AddIns is not so simple but quite effective, you can use C# or VB.NET or Phyton, it request, of course, programming knowledge.
There is a link that explain how to do it in Phyton:
I guess another way, more simple (i really didn't try it) is using Model Builder, there is a tutorial for this