3

I work in ArcGIS 10.3 I have a network consisting of 2 sets of polylines:

  1. "pair" shapefiles (polylines) connecting two points (different line for each pair), these polylines have an attribute "value"
  2. "edge" shapefiles (polylines) which correspond with the "pair" polylines, e.g. polyline A-C goes along edge1 and edge2

I made a scheme which displays a simplified situation I'm solving:

A scheme of the network

What I need to do is to accumulate values on each of the edges. So, for example let's take a look at edge2. Edge2 should have value of 18: pairs A-C, A-D, A-E, B-C, B-D, B-E are all "going through" edge2, so all the values of each pair should accumulate on the edge, therefore the value of edge2 = 18.

Is there any method I could use to do this?

There are 42 edges and 171 pairs in my project. I don't need to know which or how many of the pairs are going through an edge, just the acummulated value on it.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
M. Tomas
  • 183
  • 8

2 Answers2

2

This is how I would do it and can be automated using ModelBuilder in ArcGIS Desktop.

  1. Construct a dataset of the points ensuring they are labelled as A..E
  2. Step through your pair shapefile and create the routes between ALL your pairs of points. This will create a FeatureClass with many overlapping polylines.
  3. Ensure that each polyline route you created in step 2 also has it's value, e.g. route A-D is 5.
  4. Extract the centroid of each edge.
  5. Do a spatial join of centroid to your route layer.
  6. Summarise by route ID

This approach assumes you have access to the network analyst extension. You would be generating shortest route between your points so potentially what your pair shapefile is saying may not be the route generated by network analyst and you could potentially miss edges in loops. You do not describe what your network represents so I can't tell if that will happen.

Hornbydd
  • 43,380
  • 5
  • 41
  • 81
  • I already have the point dataset. Also I already have routes between all the pairs and added values to them too. I do have access to the NA extension. The points represent "towns". The edges are parts of road network. A pair value represents intensity of interaction between two points. So basically I need to know the value on each part of the road network which tells me how many "connections" are running through that particular road. – M. Tomas Nov 29 '17 at 17:20
  • Sounds like you have done steps 1 to 3, so all you need to do is 4-6, a 5 minute job. – Hornbydd Nov 29 '17 at 19:19
  • I'm not sure how to execute task 5. and 6. I used Spatial Join tool, target = polylines of pairs, join = centroids of edges. I chose join_one_to_one and match option: intersect. There's an option to summarize fields by merge rules, so I experimentally set fields with values to merge rule: sum. Output feature class has 171 entries and 2 new attributes: join_count and target_fid. I don't know if this is right and how then to do summarize by route ID. – M. Tomas Dec 01 '17 at 16:16
  • I think it should be the other way around: 42 entries (number of centroid points) and a field with summarized (accumulated) values. – M. Tomas Dec 01 '17 at 16:22
  • Update: I managed to complete the task. The spatial join matched centroids (edges) to each of the pairs and then I summarized centroids ID field and summed the fields containing values of the pairs. Thank you for helping me! – M. Tomas Dec 01 '17 at 18:07
1

If ArcObjects is an option, this could be done by

  1. create a Dictionary keyed by OID, with values populated from your shapefiles
  2. create a MapTopology containing both pairs and edges.
  3. iterate over the Edges accumulating values from your dictionary to populate an edge attribute with the sum of all coinciding pairs.
Kirk Kuykendall
  • 25,787
  • 8
  • 65
  • 153