Good morning, I am trying to create new territories for our inspectors based on the number of locations to be inspected. Our office is centrally located in the county. We are wanting to have wedge-shaped territories radiating from our office, like pieces of a pie. Any suggestions on how to have the GIS assist with the division?
Thanks,
Juanette
Question - what data is available to use in dividing up the territories? Any chance you have point data showing each inspection?
Also, let me add in who probably has several ideas on how to solve your original proposal:
EDIT: Xander Bakker beat me to it. I need to learn how to type faster......
Chris Donohue, GISP
Thanks Chris. This is for inspecting restaurants, pools, hotels etc so I will have point data as soon as I finish cleaning up the geocoding. 🙂
Several possibilities...
2. You could artificially create a circle to overlay your area and divide into the desired number of sectors needed and sample your points within each sector
3. You could use the network analyst extension (aka the not free extension) and produce a service area AND shortest route to the destinations from the office and divide it up as in step 2. It might look like the above, but there might be fewer lines since the same road could be used to go from the different points (ie from point 59 to 99 to 26 might be the shortest, so you reduce 3 lines to 1, if they were connected by a road.)
4. other ideas pending... a nice screen grab would help fine-tune the above
Here is a quick screen grab. The star is our office and the dots are locations to be inspected.
A circle division would be unduly cruel to just about everyone particularly if the slices of the circle were equal. Since the intent...I hope... is to be fair and minimize clients, drive times and total costs, I am leaning more towards a Network Analyst solution.
In any event, it would be fairly easy and quick to solve if you just wanted to do something like quarter the distribution knowing full well that each quarter would have an unequal number of places to visit and the aspects of drive time and cost would be pretty well thrown out the window.
So back to you again...
... and if you don't have access to the Network Analyst, you could do this in ArcGIS Online, if you have some credits to burn. Plan Routes—ArcGIS Online Help | ArcGIS can help to assign each point to an inspector. This will not create polygons, but will assign each point to a route (or vehicle = inspector).
I believe that a max of 200 points will be assigned per vehicle and each "vehicle/inspector" will burn 1 credit. If there are 1000 points and you have 5 inspectors, 5 routes will be calculated and you will consume 5 credits. So that's not a big thing (no need to take a second mortgage on your house)
To answer your questions, Dan.
I do appreciate all your thoughts and insight into this problem.
The earlier suggestion of Theissen polygons or voronoi diagrams you didn't respond to (see Xander's earlier post). Is another potential route to take. It would require some work to cluster you data into logical areas rather than just the individual points. The Triangulation tools I wrote produces for Voronoi diagram and Delauney triangulation which may be of use. http://www.arcgis.com/home/item.html?id=6e9bc6cbf93d4939b2eb04ff8519be47
Interesting what you can do with wedges...
Precision is off (not much intelligence in the definition of the cut-off angles), but I'm getting somewhere... Will try to post some code tomorrow.
Xander Bakker forgot about this one... only got so far... I am sure you are using numpy too and could use a distraction
import numpy as np import pylab as plt angle = [np.deg2rad(i) for i in range(-180,180,30)] R= 100 Xs = R*np.cos(angle) # X values Ys = R*np.sin(angle) # Y values pnts = np.round(np.array(zip(Xs,Ys)), 3) # create the points print("{}".format(pnts)) # center point and mean distance XY_c = np.array([0.0,0.0]) # create a center point Xc, Yc = XY_c.flatten() # pull out values separately # fig = plt.figure() ax = fig.add_subplot(1, 1, 1) circ = plt.Circle((Xc, Yc), radius=R, color='w',lw=2,alpha=.5) ax.add_patch(circ) plt.axis('equal') plt.scatter(Xs,Ys) plt.show()
Now just change the radius, give it a real center, connect the center to the points as triangles and you have a big circle for intersection or select by attributes (distractions... distractions... )
[[-100. -0. ] [ -86.603 -50. ] [ -50. -86.603] [ 0. -100. ] [ 50. -86.603] [ 86.603 -50. ] [ 100. 0. ] [ 86.603 50. ] [ 50. 86.603] [ 0. 100. ] [ -50. 86.603] [ -86.603 50. ]]
ADDENDUM
c =np.array([0,0]) p = np.array([[c,pnts[i-1],pnts,c] for i in range(1,len(pnts))]) >>> print(p) [[[ 0. 0. ] [-100. -0. ] [ -86.603 -50. ] [ 0. 0. ]] [[ 0. 0. ] [ -86.603 -50. ] [ -50. -86.603] [ 0. 0. ]] etc
should get you polys which can be "Arc'ed" into shape