I'm working with building routes for a lit of technician's stops. In some cases, they have two "stops" at the same customer location -- turning on two types of service at a house, for example, is listed as two jobs even though it's at the same house.
Each point has a start time (when they're supposed to arrive), a duration (how long the work should take to complete), and task type. I need to remove the duplicate geographies, because the resulting route maps aren't as clear as they could be -- the frequent question in meetings is "why isn't there a Stop #1?" and answering "because it's at the same place as Stop #2 and that marker is on top of it" tends to confuse non-GIS colleagues. However, I also:
- want to preserve the earlier start time for Task 1, not the later start time of Task 2
- need to sum the task durations, so if Task 1 takes 5 minutes and Task 2 takes 10 minutes, the combined single-stop task takes 15 minutes
- would like to keep task types around (concatenating the strings could work)
So something like the following example, Joe's first two stops need to be combined into one:
1 8:00 8:24 24 -81.12346 31.54642 DNP Joe Smith 2 8:24 8:37 13 -81.12346 31.54642 LCT Joe Smith 3 8:45 8:55 10 -81.65487 31.45121 ABC Joe Smith
The ideal result is:
1 8:00 8:37 37 -81.12346 31.54642 DNP; LCT Joe Smith 2 8:45 8:55 10 -81.65487 31.45121 ABC Joe Smith
I considered dissolving on a lat/long and technician fields, but that wouldn't preserve the other attributes.
I can find the duplicates and build a list of OBJECTIDs that need to be merged with a search cursor, but I am confused how to proceed after that. I've drawn out a sequence of search and update cursor loops which would probably work, but seems inelegant and inefficient (requires looping through the entire feature class many times). Is there a better approach?