|Mapping Rochester Public Utility Service Trucks in Real-Time Using ArcGIS, GPS, and Web Service Technologies
By Ryan Moore, GIS Specialist, Rochester Public Utilities
Rochester Public Utilities
(RPU), located in Rochester, Minnesota, conducted a pilot study equipping two of its fleet vehicles with GPS units and displaying truck location data within ArcGIS. Benefits of utilizing this technology include allowing dispatch to send the closest truck to a reported outage or service call and enhancing the safety of field crews by providing an accurate location to emergency services in the event of an accident.
was selected to provide the GPS hardware that mounts in the truck. The GPS data collected is transmitted to Networkfleet’s servers via a cellular data connection. Over the past couple years, RPU has been able to view truck locations using Networkfleet’s web mapping interface (Figure 1). However, it was determined that the truck locations would be more beneficial if they could be incorporated as a layer within RPU’s enterprise GIS.
Integrating with RPU’s GIS
To accomplish the integration, RPU GIS staff took advantage of a web service as part of RPU’s Networkfleet subscription.
First Step: The staff developed a Visual Basic.Net application that ran every two minutes to reference Networkfleet’s web service and called the function that returned the trucks’ current GPS coordinates. The data returned was stored in an SQL database for historical purposes and was also written to a text file that is used in ArcMap.
Originally, the application ran on a server as a scheduled task, but subsequent improvements have made it a Windows service* that will run with no user interaction required. Testing confirmed that the Windows Service ran more efficiently (less CPU and memory requirements) than running the executable as a scheduled task. Additionally, the Windows service will run even if no one is logged into the machine, which is useful if the server were to reboot due to a power interruption (provided the service is configured to run automatically). Also, a custom Windows Service Log was created which shows when the application last ran, if it encountered any errors, and when the service was started and stopped.
Second Step: A second Visual Basic application was developed to create a custom button in ArcMap. When clicked, the text file generated by the first application is added to ArcMap and a new layer is created based on the GPS coordinates as shown in Figure 2. The code behind the button checks to see if the Truck Location layer exists. If it does, it doesn’t get added again, and the extent of the existing layer is refreshed.
With the pilot project now successfully completed, RPU is exploring expanding its use by installing GPS in more trucks.
For more information, please contact Ryan Moore at firstname.lastname@example.org
* A Windows service is a long-running executable that performs specific functions and does not require user intervention; they’re found in the Start – Control Panel – Administrative Tools – Services shortcut.