# Mean centre on the roads network

I am trying to evaluate the current police stations. so I want to find the mean point of crime points in the city and compare the OD cost matrixes of the results. Is there any way to find the mean centre of points on a network?

• So you want to find a location on the network that satisfies some "centring" criterion? Would the location that minimises the sum of squared distances along the network to the crime points work? – Spacedman Sep 7 '15 at 16:51
• Actually ArcGIS 10 has a function to find the mean center but it does not consider the network. I added the historic traffic to the network. so drive time is the variable to centring. – Javad Koohpayma Sep 7 '15 at 17:22
• Well the arithmetic mean x and y coordinate (which is probably what arcgis gives) minimises the sum of squared distance in 2d space, so do you want the location that minimises the sum of squared travel times to the points? – Spacedman Sep 7 '15 at 17:57
• I think so but not sure about the sum of squared travel times. – Javad Koohpayma Sep 7 '15 at 18:41

For 2D case there are many options possible. One of them is arithmetic mean as per @Spacedman comment. I prefer very elegant peel away techinque by @whuber As one can see for the pattern of 'crimes' I've used the results are very close. Note you cannot use weight (more than 1 crime in the same place) using peeling.

In case of network I don't see any other way but going through all network nodes and picking one that meets your criteria  In this case criteria is a minimum total distance of travel, perhaps total of squares is better. I guess it can be done using Network Analyst. I used networkx python package. Network shown has 2951 nodes and 3761 links (62 scenes). It took 45 mins on my rather solid machine. Time can be reduced using multi-processing