Sunteți pe pagina 1din 47

ArcGIS for Transportation

Analytics

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

Table of Contents
ArcGIS for Transportation Analytics Contents and Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . 3
Configure the street data

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Publish the route service

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Publish the VRP services

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Publish the geocode service

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Route Planner: Install and configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19


Set up the enterprise geodatabase

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Publish the Workforce Management feature service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30


Configure Workforce Management

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Dashboard sample app: install and configure


Set up the live traffic feed

Publish the traffic map service

Copyright 1995-2013 Esri. All rights reserved.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

ArcGIS for Transportation Analytics

ArcGIS for Transportation Analytics Contents and Configuration


Overview
ArcGIS for Transportation Analytics helps you minimize the costs associated with operating a fleet of vehicles. At its core, value comes
from using ArcGIS for Server to host Routing, Vehicle Routing Problem, Geocode and Feature services published from ArcGIS for
Desktop using NAVTEQ data specific to your region. Also, all licensing is included for using NAVTEQ data for routing, optimization, and
navigation tasks.
Additionally, the ArcGIS for Transportation Analytics bundle includes a few sample applications which you may choose to use. The Route
Planner is a lightweight desktop sample application that plans and optimizes work for your fleet. The status dashboard is a web application
built using HTML5 web standards which tracks fleet vehicle locations and order status updates. The iOS Navigator is an Apple Xcode
project containing source code which you can compile and deploy on your own iOS devices for in-vehicle navigation. Note that these
applications are provided as samples to help get you up and running or to be extended with plug-ins or source code modification to meet
the needs of your organization. They are not intended as a complete and ready-to-implement solution.
After installing and setting up services and sample or custom applications, you provide orders, which are locations or addresses to visit,
characteristics of vehicles in your fleet, and other related information. In return, you receive the following:
An optimized routing plan for the entire fleet

Optimized routes for individual vehicles

Optional turn-by-turn driving directions and voice guidance for drivers via on-board electronic devices, including smartphones

An overview of the routing plan through the Dashboard app, which also provides other optional, high-level views, including the
following:
Status of planned orders (Planned, Finished, Could not service)

Where your vehicles are currently located

The fleet's actual progress towards completing the routing plan

Some assembly required


Before you start optimizing your operations with ArcGIS for Transportation Analytics, you need to install software, set up data, and
create web services. Optionally, you can also configure the supplied sample applications. Much of the documentation is focused on
guiding you through these preliminary steps.
The following subsections in this topic list and briefly describe all the components you can configure for use with Transportation
Analytics. They are described in more detail throughout the rest of the documentation, and you will also learn how to configure them.
The list below is comprehensive, but not all components are required. You can use the most basic ArcGIS for Transportation Analytics
functionality by configuring only a route, vehicle-routing-problem (VRP), and geocode service and then integrating with other databases
and applications in your organization. If you require an application to import orders and optimize your fleet, install and configure Route
Planner to reference your services. You can take full advantage of ArcGIS for Transportation Analytics capabilities by configuring all of
the items listed below.

Basic setup
After performing these steps you'll have VRP, route, and locator services hosted on your own ArcGIS server and, optionally, the
Route Planner sample application configured to use these services in optimal route calculation for your fleet.
1. Install ArcGIS for Desktop and ArcGIS for Server. See the installation instructions included with the setups you downloaded.
2.

Set up network and locator data for publishing VRP and route services. See Configure street data for details.

3.

Publish VRP, route, and geocode services. See the service-publishing topics for details.

4.

Configure the Route Planner sample app. See Route Planner: install and configure for details.

Status dashboard setup


After performing these steps, you'll be able to push your routing schedules to a feature service hosted on your ArcGIS server and
monitor the status of work being done. Please note that you will need to purchase the Navigation add-on or build your own field
applications to send status updates and update vehicle locations to the dashboard.
1.

Install a relational database management system (RDBMS). Examples within this documentation demonstrate Microsoft SQL
Server 2008 R2.

2.

Set up an enterprise database. See Set up the enterprise geodatabase for details.

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

3.

Publish a feature service for the Route Planner to send your route schedules. See Publish the Workforce Management
feature service.

4.

Deploy and configure the Dashboard sample app. See Dashboard sample app: install and configure.

Navigation add-on
If you've purchased the Navigation add-on, you'll be able to push your work schedules to drivers in the field with Windows devices.
They'll receive voice-guided, turn-by-turn directions and will be able to update the status of each work order as they service it. The
status dashboard user will be able to view these order status updates as well as view the current location of drivers in the field. Note
that the iOS Navigator sample can be used for the same purpose.
1.

Install and configure the Windows Navigator on a tablet PC or laptop with a GPS chip. See the navigator installation and
configuration help included with the product.

2.

Obtain, build, and deploy the iOS Navigator. See the iOS Navigator help for details. Note that you will need to compile and
deploy this from your own Apple Enterprise developer account.

Traffic add-on
If you've purchased the traffic add-on, you'll be able to visualize and use real-time traffic in your routing.
1.

If you haven't already done so, set up your enterprise database; see Set up the live traffic feed.

2.

Publish traffic services. See Publish the traffic map service.

3.

Configure your sample applications to use traffic services. See the installation and configuration application topics.

Components of the Transportation Analytics bundle


The following are short descriptions of the individual components that comprise the ArcGIS for Transportation Analytics bundle.
ArcGIS for Desktop
ArcGIS for Desktop is supplied to edit your geographic and street data as well as publish services to your ArcGIS server. For
installation instructions, please see the Install.htm supplied with the installation package.
ArcGIS for Server
ArcGIS for Server will host and serve your VRP, route, and feature services. These are the services that optimize your work and
route vehicles and communicate the information between the sample applications, including Route Planner, Dashboard, and
Navigator applications. For installation instructions, please see the Install.htm supplied with the ArcGIS for Server installation
package. See the services configuration topics for detailed instructions concerning the publishing and hosting of these services.
Esri StreetMap Premium data
Esri StreetMap Premium, based on street data from NAVTEQ, includes all the data you'll need for publishing routing, VRP, and
geocode services.
ArcGIS Online for organizations plan
A plan-level license is included in the ArcGIS for Transportation Analytics bundle. The plan is identified in your license terms. Data
and services can be incorporated into the solution as best fits your needs. See http://www.esri.com/software/arcgis/arcgisonline/
index.html for information on ArcGIS Online.
Route Planner sample (optional)
The Route Planner is a sample application used to optimally assign work to vehicles and manage your fleet. You can configure it to
use your hosted services right out of the box, or you can extend it using the included plug-in SDK.
Status dashboard sample (optional)
The status dashboard is a web application that can be used to monitor the status of a fleet of vehicles working for the day. It shows
current vehicle location on the map and updates order statuses based on driver entries from field navigation devices.

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

Route Planner plug-in package


Route Planner comes with a documented plug-in package which includes object model diagrams (OMDs) and example plug-ins.
Plug-ins are intended to extend functionality of Route Planner in terms of data input/output. For more in-depth functionality
changes, source code for the Route Planner may be available, along with instructions to build the project in Visual Studio.
Navigator for Windows (add-on)
Navigator provides turn-by-turn guidance to your drivers. It also updates order status and raises exceptions, which can be seen in
the Dashboard application. This sample application is for use on Windows platforms (Windows XP, Vista, and Windows 7).

Provide the Navigator_Quick_Start document for drivers.

Please take notice of safety disclaimers in this document.

Navigator sample for iPhone (optional)


Navigator for iPhone provides guidance for your drivers and runs on the iOS platform. It also updates order status and raises
exceptions, which can be seen in the dashboard application. Per guidelines from Apple, this application is not available through any
store. You'll need to obtain your own Enterprise developer license from Apple and compile and deploy the application yourself.
Please see the iOS Navigator help for more details.
RDBMS
An enterprise geodatabase in an RDBMS, such as Microsoft SQL Server Standard, is required for hosting feature services for
workflow management capabilities. These include sending work to the Navigator applications and seeing status updates in the
dashboard. It is also required to use the traffic add-on and host your own real-time traffic services.
While many RDBMSs such as Oracle and PostGreSQL can be supported, SQL Server is the DBMS used for publishing your
feature services in the examples in the configuration documentation. The express version is unsuitable for use due to concurrent
user limitations. SQL Server Standard Edition is available from Microsoft.

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

Configure the street data


The route, vehicle routing problem, and geocode web services you create with ArcGIS for Transportation Analytics need to reference
geospatial data. Transportation Analytics includes locators and streets in a file geodatabase for this purpose, and they are provided to you
either on the Streetmap Premium DVD or from an FTP download site. The locators help find where the addresses of your work orders are
so that they can be loaded as stops to the route and VRP services. The file geodatabase contains road data that the route and VRP
services need to calculate travel times and other information to find the best routes for your vehicles.
The locators and the geodatabase you received cover one of various regions in the world, such as North America or Europe. This region
should be the same region in which your vehicles will operate.
This topic provides guidance on how to copy the geospatial data onto your servers. Once the data is there, you will register it with your
ArcGIS for Server instance. Registering the data makes it possible to publish services without copying the data at the time of publishing.
For example, by copying the geodatabase to the server and registering the folder that contains it, you won't need to copy the data again;
however, if you don't register the data, you would need to copy the data twice: once when you publish the route service, and again when
you publish the VRP service.
Steps:
At least one of the following geodatabases is included with your ArcGIS for Transportation Analytics bundle:
NorthAmerica.gdb, Europe.gdb, SouthAmerica.gdb, MiddleEastAndAfrica.gdb, India.gdb, SouthEastAsia.gdb, or
Oceania.gdb. These are provided either on your Streetmap Premium DVD or from an FTP download site in certain cases.
1.

Copy the geodatabase you received and paste it into a folder on your ArcGIS machine. If ArcGIS for Desktop and ArcGIS for
Server are installed on separate machines, paste the data into both. Furthermore, if your site is made up of many ArcGIS for
Server machines, paste the data into a local folder on each machine and use the same folder path. Regardless of how many
machines you are using, make sure that the folder you paste the data into is local (for example,
D:\Services\SharedData) for each machine; don't use universal naming convention (UNC) paths, such as
\\computer\folderName, so that the services you eventually create can access the data as quickly as possible.
The data you need to copy to locate addresses with the geocode service is stored in locators found in the StreetMap Premium
for ArcGIS media; however, the locators are fragmented for delivery purposes. You need to assemble them by following the
instructions included with StreetMap Premium for ArcGIS.

2.

Read the Quick-Start Guide and assemble the locators. You can find the guide in the StreetMap Premium for ArcGIS media
at DVD1 > QuickStartGuide.htm.

3.

Once you have set up your locators, copy them into a Locators folder.

4.

Paste the Locators folder into each of the ArcGIS machines as you did with the geodatabase in step 1. The geodatabase
and the Locators folder should be siblings in the same directory; for example, if you have
D:\Services\SharedData\NorthAmerica.gdb, the Locators folder should be found at
D:\Services\SharedData\Locators. Again, if multiple machines are used in a cluster, copy the data to each machine.
Now that your data is stored locally on all machines, you will register the folder as a data store to take advantage of the
benefits described at the top of this document.

5.

Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.1.

6.

From the Catalog window, create a new administrator or publisher connection to your GIS server. You start this process by
expanding the GIS Servers node and double-clicking Add ArcGIS Server.

7.

After you make the server connection, and it appears on the bottom of the list under GIS Servers, right-click it and choose
Server Properties.

8.

Click the Data Store tab.

9.

In the Registered Folders section, click the Add button


The Register Folder dialog box appears.

10.

Specify a name in the Name text box. Any descriptive name that helps you remember that the folder contains data for your
Transportation Analytics services will work.

11.

In the Publisher folder path text box, specify the folder containing the geodatabase, for example,
D:\Services\SharedData.

12.

Under Server folder path, check Same as publisher folder path if it's not already checked. This option means the path is
exactly the same for the ArcGIS for Desktop and ArcGIS for Server machines.

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

13.

Click OK.
The Register Folder dialog box closes.

14.

Click OK.
The ArcGIS Server Properties dialog box closes.

Now that the data you need for the route, vehicle routing problem, and geocode services are in place, and ArcGIS knows where the data
is, you can create those services.

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

Publish the route service


ArcGIS for Transportation Analytics requires a vehicle-routing-problem service to calculate the best overall plan to service orders for all the
vehicles in your fleet. Transportation Analytics also requires a routing service to re-create the individual routes from the VRP service and
communicate them separately to the in-vehicle mobile devices drivers used to aid with navigating and carrying out their assigned work.
This topic lists the steps to publish a route service.
Transportation Analytics is bundled with a file geodatabase that contains road data, including feature classes, tables, and a network
dataset. The route and VRP services you will create need to reference the road data to calculate travel times and other information to find
the best routes for your vehicles; specifically, your services will reference a network dataset, which is a logical network made up of the
other road data in the geodatabase. The network dataset essentially aggregates road data into one source and precalculates information
so that the information can be provided to solvers much faster than if feature classes were queried directly.

Add the network dataset layer to ArcMap


Steps:
1.

Start ArcMap if it isn't already started.

2.

Follow the substeps below to make a connection to the file geodatabase you received with the ArcGIS for Transportation
Analytics bundle.
a. Click the Catalog Window button on the Standard toolbar to open the Catalog window.
b.

In the Catalog window, right-click Folder Connections and choose Connect to Folder.
The Connect To Folder dialog box appears.

c.

Browse to or type the folder path of the location where the file geodatabase is stored.
The folder path should point to the same location as the one you specified in the Register Folder dialog box
while working through the steps in Configuring the street data. In those steps, the example path given was
D:\Services\SharedData.

d.

Click OK.
The Connect To Folder dialog box closes and a connection is added to the Folder Connections node in the
Catalog window.

3.

In the Catalog window, navigate to the new folder connection, expand the contents of the file geodatabase, then expand
the Routing feature dataset.
In the Routing feature dataset, you should see several feature classes and a network dataset named Routing_ND. The
feature classes are referenced by the network dataset.

4.

Add the network dataset to ArcMap by dragging it from the Catalog window and dropping it into ArcMap's map view or
table of contents.
The Adding Network Layer dialog box appears.

5.

Click No.
The network dataset begins to draw; however, this process may take a while and visualizing the network dataset isn't
necessary, so you will cancel the drawing.

6.

Press ESC to stop the drawing.

7.

Uncheck Routing_ND in the Table of Contents window so the layer won't draw when the map is refreshed.

8.

Double-click the Routing_ND layer in the Table of Contents window.


The Layer Properties dialog box opens.

9.

Click the Symbology tab.

10.

Under Show, uncheck Traffic and check Edges.

11.

Click OK.
You need only a network dataset to create a routing service, but if you are going to use the iOS Navigator app and take
advantage of special locating capabilities that avoid reroutes while driving in a parking lot, for example, you also need to
add the Streets feature class to the map and create a feature service. Aside from checking a Query check box when
publishing, creating the feature service is automatic when creating this route service.

12.

If you are going to use the ArcGIS for Transportation Analytics iOS Navigator app, add the Streets feature class to
ArcMap. (The Streets feature class is a sibling to the Routing_ND network dataset that you just added.)

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

a.

Optionally, press ESC to stop the layer from drawing. Depending on which region of data you are working with
and your map's extent, there may be millions of lines to draw, which can take several minutes to complete.
Viewing the streets isn't necessary.

b.

Uncheck Streets in the Table of Contents window to prevent it from drawing again.

Although you've added two layers to ArcMap, the map viewer is blank. The layers don't need to be visible for the publishing
process.

Create a route layer and publish the route service


Before a route analysis layer can be created in ArcMap, a network dataset layer needs to be present. You added a network dataset
layer in the previous section of this topic, so now you can create the route analysis layer. Once the route layer is created, you can
publish the map to your server. This results in a route service.
Steps:
If the Network Analyst toolbar is not displayed, you need to add it.
1.

Click Customize > Toolbars > Network Analyst.


The Network Analyst toolbar is added to ArcMap.

2.

From the Network Analyst Toolbar, click Network Analyst > New Route.
A network analysis layer and its sublayers are added to the table of contents.

3.

Some metadata is required to publish any service successfully. Follow the substeps below to add metadata to the map
document.
a. From the menu bar, click File > Map Document Properties.
The Map Document Properties dialog box appears.
b.

4.

Add text to the Title, Summary, Description, Author, Credits, and Tags sections.

Save the map document.


You may want to save the document to a location that is close to the street data referenced by the service. For example, if
you saved the data to D:\Services\SharedData, saving the map document to D:\Services\Route\Route.mxd
would make it easy to access.
Next, you will start the wizard to walk through the publishing process.

5.

From the menu bar, click File > Share As > Service.
The Share as Service wizard appears.

6.

Make sure that Publish a Service is selected and click Next.

7.

Under Choose a connection, choose the GIS server connection that you set up while following the steps in Configuring
the street data.

8.

Enter Route in the Service name text box.

9.

Click Next.

10.

Choose whether to publish the route service to an existing folder on your server, which includes the root level, or to a new
folder. Publishing to the root level is common.

11.

Click Continue.
The Service Editor dialog box appears.

12.

Click Capabilities in the left pane. Uncheck KML and check Network Analysis.

13.

Click Network Analysis in the left pane, click the General tab on the right pane, then follow the substeps below.
a. Specify 10 Meters for Default Output Geometry Precision.

14.

b.

Make sure that Allow saving result layer on the server is checked.

c.

Check Save result layer on server when an error occurs.

Click Pooling, which is on the left pane of the dialog box, and specify the minimum and maximum number of instances per
machine. For optimal throughput, the recommended minimum and maximum values should be equal to the number of
cores on the server machine.

Copyright 1995-2013 Esri. All rights reserved.

ArcGIS for Transportation Analytics

15.

Click the Analyze button

16.

Examine the messages in the Prepare window and take appropriate action. Note that error messages require corrective
action, while warning and information messages do not, but fixing them may improve service performance. You can rightclick a message for recommended and automated fixes and links to help documents.
a. One warning message you should fix is The output shape type has measures enabled. Right-click the
message and choose Disable measure output.

, which is near the top of the Service Editor dialog box.

17.

In the Service Editor dialog box, click Publish

The route service is now available on your server.


18.

Close the map document and save any changes.

Test your route service (optional)


This section is optional but useful if you want to confirm that your routing service works.
There are many ways to test that the route service is working, but one way is to use ArcMap's Find Route tool, as show in the steps
below.
Steps:
1.

From the menu bar, click File > New.


The New Document dialog box appears.

2.

Double-click Blank Map.

3.

Click Yes if you are asked if you want to save changes to Route.mxd.
To use the new service with the Find Route tool, you need a user connection to the GIS server that hosts your route
service. You should already have a connection from when you were registering your data in the Data Store dialog box;
however, that connection was set up with administrator or publisher privileges, not user-level privileges.

4.

Set up a user-level connection to your GIS server. You can start this process in the Catalog window by expanding GIS
Servers and double-clicking Add ArcGIS Server.
Now that you have a user connection, you will add a basemap for reference so that when you interactively add stops for a
route, you can confirm they are placed within the region your data covers.

5.

On the Standard toolbar, click the drop-down arrow next to the Add Data button
The Add Basemap dialog box appears.

and choose Basemap.

6.

Double-click a basemap that works well for referencing the road network in your region, such as Streets, National
Geographic, Topographic, or OpenStreetMap.

7.

Zoom in to the region the data in your file geodatabase covers. Zoom to a scale of 1:500,000 or so to ensure your route
takes only a moment to calculate.

8.

On the Tools toolbar, click the Find Route button


The Find Route dialog box appears.

9.

Click the Options tab.

10.

Click the browse button that is to the right of the Routing Service drop-down list.
The Choose Routing Service dialog box appears.

11.

Click the Server Data button on the left pane.


Your current connections to GIS servers are listed on the right.

12.

Expand the user connection to your server that houses the route service you published. Make sure that the connection
name ends with (user).

13.

Click the route service. If you stored the service in the root level of the server, you won't need to expand any folders;
otherwise, you'll need to navigate down to the location you specified earlier.

14.

Click Open.
The service is listed and chosen in the Routing Service drop-down list of the Find Route dialog box.

15.

Click the Stops tab.

16.

Click the add stops interactively button, which has a white arrow cursor and a red dot on it.

Copyright 1995-2013 Esri. All rights reserved.

10

ArcGIS for Transportation Analytics

17.

Click on the map to add a stop. You may need to reposition the Find Route dialog box to see the map view.

18.

Click somewhere else on the to add another stop.

19.

Click the Find Route button on the Find Route dialog box.
A route should appear, confirming your route service is functioning. If the route is infeasible, you can try adding more stops
or moving them and re-solving.

In this topic, you added a network dataset to the map, created a route analysis layer, and published the map to create a routing service.
You will add two more GIS services to support your instance of ArcGIS for Transportation Analytics: a vehicle routing problem service and
a geocode service.

Copyright 1995-2013 Esri. All rights reserved.

11

ArcGIS for Transportation Analytics

Publish the VRP services


This topic steps you through publishing the vehicle-routing-problem services ArcGIS for Transportation Analytics needs to create and edit
routing plans for your fleet of vehicles. These services are geoprocessing services that are created by running the Solve Vehicle Routing
Problem geoprocessing tool in ArcMap and publishing the results to ArcGIS for Server. Before you can publish, however, the tool needs to
run successfully. The Route service that you published previously wasn't a geoprocessing service, so publishing these VRP services is
slightly different.
Two VRP services are published to accommodate two operations: creating a fleet-routing plan and editing the plan after it's created. The
services are almost identical, except for one important difference: the service for creating the routes for the first time runs asynchronously,
and the service for updating and re-solving the routes after they are created runs synchronously.
Editing an existing VRP solution and re-solving doesn't take much time, so synchronous servicesin which the connection between the
client and server stays openwork well. However, finding a solution to a vehicle routing problem for the first time can take a lot longer
than updating and re-solving a preexisting solution; in fact, it's not uncommon for first-time solves to last longer than 60 seconds and
solves on edited solutions to last only about 10 seconds.
Synchronous communication over the Internet starts to break down when the length of the connection surpasses 60 seconds.
Intermediate hardware on the Internet between the client and server assume the connection has malfunctioned at that point and forces a
disconnection. Consequently, the server cannot deliver the VRP solution to the client.
Asynchronous services make it possible to avoid forced disconnections by submitting a request to the server, disconnecting, and
periodically reconnecting to see if the task has completed. Once the solution is ready, the connection stays open to download the results.
In the sections below, you will publish two VRP services: VehicleRoutingProblem and VehicleRoutingProblemSync.

Publish the asynchronous service (VehicleRoutingProblem)


Steps:
1.

Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.1.
If it's already started, open a new, blank document.

2.

Add to ArcMap the Routing_ND network dataset from the file geodatabase you received with the Transportation Analytics
bundle. If you need extra guidance with this step, see the substep below.
a. In the first set of steps from Publishing the route service, you made a folder connection to the geodatabase
containing the Transportation Analytics network dataset. Browse to that folder connection in the Catalog window,
expand the file geodatabase inside the folder, then expand the Routing feature dataset. Add the Routing_ND
network dataset to the map by dragging it from the Catalog window and dropping it into ArcMap's map view or
table of contents.
The Adding Network Layer dialog box appears.

3.

Click No.
The network dataset begins to draw; however, this process may take a while and visualizing the network dataset isn't
necessary, so you will cancel the drawing.

4.

Press ESC to stop the drawing.

5.

Uncheck Routing_ND in the Table of Contents window so that the layer won't draw when the map is refreshed.

6.

Double-click the Routing_ND layer in the Table of Contents window.


The Layer Properties dialog box appears.

7.

Click the Symbology tab.

8.

Under Show, uncheck Traffic and check Edges.

9.

Click OK.
The VRP services you are publishing are more generically referred to as geoprocessing services. You need to successfully
run a geoprocessing tool at least once before you can publish it as a geoprocessing service. In the next steps, you will add
a basemap and zoom in to a large scale to make it easier to set up a simple problem and solve it.

10.

On the Standard toolbar, click the drop-down arrow next to the Add Data button
The Add Basemap dialog box appears.

11.

Double-click a basemap that works well for referencing the road network in your region, such as Streets, National
Geographic, Topographic, or OpenStreetMap.

Copyright 1995-2013 Esri. All rights reserved.

and choose Basemap.

12

ArcGIS for Transportation Analytics

12.

Zoom in to the region that the data in your file geodatabase covers. Zoom to a scale of around 1:100,000.

13.

Enable the ArcGIS Network Analyst extension.


a. Click Customize > Extensions.
The Extensions dialog box opens.
b.

Check Network Analyst.

c.

Click Close.

14.

Click Geoprocessing > Results.


The Results window appears.

15.

Optionally, reposition or dock the Results window so you can see the map.

16.

From the Catalog window, expand Toolboxes > System Toolboxes > Network Analyst Tools > Server.

17.

Double-click the Solve Vehicle Routing Problem tool to open its tool dialog box.

18.

Enter inputs to the Solve Vehicle Routing Problem as specified in the substeps.
a. Click the point symbol that is labeled orders, then click on the map to add an order.
b.

Click the point symbol that is labeled depots, then click on the map to add a depot.

c.

Locate the SolveVehicleRoutingProblem::depots layer in the Table of Contents window, right-click the layer
name, and choose Open Attribute Table.
The Table window opens.

d.

Type d1 in the Name field of the lone depot record. The depot now has an identifying name so the route you
create next can be associated with the depot.

e.

Close the Table window.

f.

In the Solve Vehicle Routing Problem tool dialog box, click the Add button under the Routes parameter.
A route is created, as indicated by the 1 in the table under the Routes parameter.

g.

Type d1 in the StartDepotName field. The start depot name must match the name of a depot feature.

h.

Click the drop-down list in the Network Dataset parameter and choose Routing_ND. This indicates the VRP
analysis will be performed on the network dataset you added to the map in a prior step.

i.

Leave the other parameters with their default values.

j.

Click OK to execute the tool.

The inputs and, eventually, the results of the analysis are summarized in the Results window.
19.

In the Results window, expand Current Session.

20.

Make sure that the solve was successful before proceeding. If it was unsuccessful, look at the Messages section under
SolveVehicleRoutingProblem to determine what caused the failure. Try to reopen the tool, add new inputs, and solve
again. The tool needs to execute successfully before you can publish it as a service.

21.

Right-click SolveVehicleRoutingProblem and choose Share As > Geoprocessing Service.


The Share as Service wizard opens.

22.

Make sure that Publish a service is chosen and click Next.

23.

Choose the publisher or administrator connection to your server from the Choose a connection drop-down list.

24.

Type VehicleRoutingProblem in the Service name text box.

25.

Click Next.

26.

Choose whether to publish the route service to an existing folder on your server, which includes the root level, or to a new
folder. It is common to publish to the root level.

27.

Click Continue.
The Service Editor dialog box appears.

28.

Click Parameters in the left pane.


a. Under Execution Mode, make sure Asynchronous is chosen.
b.

Choose Warning from the Message Level drop-down list.

c.

Type 100000 (100,000) in the Maximum number of records returned by the server text box.

Copyright 1995-2013 Esri. All rights reserved.

13

ArcGIS for Transportation Analytics

29.

Click Pooling, which is on the left pane of the dialog box, and specify the minimum and maximum number of instances per
machine. For optimal throughput, the recommended minimum and maximum values should be equal to the number of
cores on the server machine.

30.

On the left pane of the dialog box, under Solve Vehicle Routing Problem, click the Network Dataset parameter, which is
also in the left pane, then choose Constant Value from the Input mode drop-down list.

31.

Set Input Mode to Constant value for the following parameters:


Output Unassigned Stops Name

Output Stops Name

Output Routes Name

Output Directions Name

Time Attribute

Distance Attribute

Maximum Snap Tolerance

Exclude Restricted Portions of the Network

Save Output Network Analysis Layer

32.

Click Attribute Parameter Values on the left pane.


a. Check Include records.

33.

Click Item Description on the left pane.


a. Fill out the Summary and Tags sections if they aren't filled out already.

34.

Click the Analyze button

35.

Examine the messages in the Prepare window and take appropriate action. Note that error messages require corrective
action, warning and information messages do not, but fixing them may improve service performance. You can right-click a
message for recommended fixes and links to help documents.

36.

In the Service Editor dialog box, click Publish

, which is near the top of the Service Editor dialog box.

Once the process is complete, the asynchronous VRP service is available on your server. This is the service used to solve
vehicle routing problems for the first time.
Keep ArcMap open; you will continue to use it in subsequent sections.

Publish the synchronous service (VehicleRoutingProblemSync)


In this section, you will set up the service for solving edited vehicle routing problems. The steps in this section are identical to many of
the steps in the last section because the only difference when publishing is that you check a box to indicate the service will be
synchronous rather than asynchronous.
The Results window in ArcMap should still have the results from running the Solve Vehicle Routing Problem geoprocessing tool. (If it
doesn't, perhaps because you closed ArcMap, you will need to run the tool again.) You can start the publishing process from there.
Steps:
1.

In the Results window, expand Current Session.

2.

Right-click SolveVehicleRoutingProblem and choose Share As > Geoprocessing Service.


The Share as Service wizard opens.

3.

Make sure that Publish a service is chosen and click Next.

4.

Choose the publisher or administrator connection to your server from the Choose a connection drop-down list.

5.

Type VehicleRoutingProblemSync in the Service name text box.

6.

Click Next.

7.

Choose whether to publish the route service to an existing folder on your server, which includes the root level, or to a new
folder. It is common to publish to the root level.

8.

Click Continue.
The Service Editor dialog box appears.

Copyright 1995-2013 Esri. All rights reserved.

14

ArcGIS for Transportation Analytics

9.

Click Parameters in the left pane.


a. Under Execution Mode, choose Synchronous.
This is the parameter that determines whether a connection between the client and server will be held until the
server has finished the task. Synchronous indicates the two stay connected and implies the processing on the
server will be quick (well under 60 seconds). This second VRP service is for editing and re-solving a vehicle
routing problem, which is a relatively quick process.
b.

Choose Warning from the Message Level drop-down list.

c.

Type 100000 (100,000) in the Maximum number of records returned by the server text box.

10.

Click Pooling, which is on the left pane of the dialog box, and specify the minimum and maximum number of instances per
machine. For optimal throughput, the recommended minimum and maximum values should be equal to the number of
cores on the server machine.

11.

On the left pane of the dialog box, under Solve Vehicle Routing Problem, click the Network Dataset parameter, then
choose Constant Value from the Input mode drop-down list.

12.

As you did in the previous step, set Input Mode to Constant value but for the following parameters:
Output Unassigned Stops Name

Output Stops Name

Output Routes Name

Output Directions Name

Time Attribute

Distance Attribute

Maximum Snap Tolerance

Exclude Restricted Portions of the Network

Save Output Network Analysis Layer

13.

Click Attribute Parameter Values on the left pane.


a. Check Include records.

14.

Click Item Description on the left pane.


a. Add text to the Summary, Tags, and Description sections if they aren't already filled out.

15.

Click the Analyze button

16.

Examine the messages in the Prepare window and take appropriate action. Note that error messages require corrective
action, while warning and information messages do not, but fixing them may improve service performance. Right-click a
message for recommended fixes and links to help documents.

17.

In the Service Editor dialog box, click Publish

, which is near the top of the Service Editor dialog box.

Once the process is complete, the synchronous VRP service will be available on your server. This is the service used to resolve vehicle routing problems that have been edited.
Keep ArcMap open if you plan to continue on to the next section and test your service; otherwise, close the map document
without saving it.

Test the VRP service in ArcMap (Optional)


Now that you have published both VRP services, you may want to test one to see whether or how it works. In this section you will solve
a problem using the asynchronous VRP service.
Steps:
1.

From the ArcMap menu bar, click File > New.


The New Document dialog box appears.

2.

Double-click Blank Map.

3.

Click No when asked to save the changes.

4.

On the Standard toolbar, click the drop-down arrow next to the Add Data button
The Add Basemap dialog box appears.

Copyright 1995-2013 Esri. All rights reserved.

and choose Basemap.

15

ArcGIS for Transportation Analytics

5.

Double-click a basemap that works well for referencing the road network in your region, such as Streets, National
Geographic, Topographic, or OpenStreetMap.

6.

Zoom in to the region that the data in your file geodatabase covers. Zoom to a scale of around 1:100,000.

7.

In the Catalog window, expand GIS Servers > [the name of your GIS server] > VehicleRoutingProblem.

8.

Double-click Solve Vehicle Routing Problem.


The task dialog box opens. Note that it looks similar to the Solve Vehicle Routing Problem geoprocessing tool, which you
opened earlier in this topic. The difference is that the current dialog box is referencing a service on your ArcGIS for Server
instance, and not all the parameters available in the geoprocessing tool are exposed here in the task dialog box. The
hidden parameters are those you marked as constants while publishing the service.

9.

Enter inputs to the task dialog box as specified in the substeps.


a. Click the point symbol that is labeled orders, then click on the map to add an order.
b.

Click the point symbol that is labeled depots, then click on the map to add a depot.

c.

Locate the SolveVehicleRoutingProblem::depots layer in the Table of Contents window, right-click the layer
name, and choose Open Attribute Table.
The Table window opens.

d.

Type d1 in the Name field of the lone depot record.

e.

Close the Table window.

f.

In the Solve Vehicle Routing Problem task dialog box, click the Add button under the Routes parameter.
A route is created, as indicated by the 1 in the table under the Routes parameter.

g.

Type d1 in the StartDepotName field. The start depot name must match the name of a depot feature.

h.

Leave the other parameters with their default values.

i.

Click OK to execute the tool.


After a few moments the server returns the results, including feature layers and tables, which appear in the table
of contents. The results are not stylized, so it is hard to see the route lines, for example. Route Planner, on the
other hand, will automatically stylize the results from this service and help you visualize important information so
it is easier to understand the routing plan.

By following the steps in this topic, you should have set up synchronous and asynchronous VRP services for creating and editing fleet
routing plans. Later, you will configure the Route Planner application to reference these services. In the meantime, however, you will need
to set up a geocode service, which will allow you to pass text addresses into the service and receive geographic coordinates that
represent those addresses. The addresses and their geographic locations can be passed into these VRP services, which allows your fleet
of vehicles to be routed to the addresses of your work orders.

Copyright 1995-2013 Esri. All rights reserved.

16

ArcGIS for Transportation Analytics

Publish the geocode service


This topic lists the necessary steps to publish a geocode service. With this service, you can pass in textual addresses, place-names, or
other text-based identifiers and receive geographic coordinates indicating where the addresses or places are located. In the context of
ArcGIS for Transportation Analytics, the textual addresses represent the work orders, depots, and other places your fleet of vehicles
needs to visit. Because VRP services cannot read textual addresses as input, the addresses are sent to the geocode service first, then the
output geographic coordinates are sent to the VRP service so that routes can be generated.

Publish the geocode service


Steps:
1.

Start ArcMap.
In Configure the street data, you copied a file geodatabase and locators from the StreetMap Premium for ArcGIS media and
pasted them into a folder on your ArcGIS for Desktop and ArcGIS for Server machines, then you registered the folder with
ArcGIS.

2.

In the Catalog window, browse to the Locators folder you previously copied. For example, if you copied the locators to
D:\Services\SharedData\Locators and made a folder connection to it, browse to Folder Connections >
D:\Services\SharedData > Locators.
A list of locators appears.
The locators you see are unique to the region or regions you chose when you purchased ArcGIS for Transportation
Analytics. You will need to choose a locator to publish as a geocode service.
Of the different locator types, those based on address points tend to provide the best results for routing vehicles; however,
address points may not be available in your region. Locators created with street addresses, that is, by interpolating the
location of an address from a high and low address range along a street, is another reliable option. The most commonly
used locators are the composite locators for individual countries. These composite locators try to locate addresses at the
most accurate level (for example, the address-point or street-address level), then fall back down through less accurate
locators, one at a time, until the address is found.
Larger organizations often choose regional composite locators, which consist of multiple, country-level composite locators.
For example, a good choice for an organization that is routing strictly within the United States is USA_[release
version]_CompositeAdvanced. NA_[release version]_CompositeAdvanced tends to be a good choice if you are routing in
the U.S. and Canada or Mexico. (NA in the locator name is an abbreviation for North America.)
If you are routing domestically in Finland, a good locator choice is FIN_Geocoding_Service. Yet, if your routes span most of
Europe, Europe_Geocoding_Service locator is recommended.
Tip: You can find descriptions for the different kinds of locators in the StreetMap Premium for ArcGIS
help.
To open the help, browse within the StreetMap Premium for ArcGIS media to DVD1 >
Documentation and double-click help.htm.
Once the help system is opened, click Geocoding addresses > About the address locators.
A table lists and describes the various locators.

3.

In the Catalog window of ArcMap, right-click the locator you want to publish and click Share As > Geocode Service.
The Share as Service dialog box opens.

4.

Make sure that Publish a service is chosen and click Next.

5.

Choose the publisher or administrator connection to your server from the Choose a connection drop-down list.

6.

Type GeocodeService in the Service name text box. Type a more descriptive name if you want or if you plan to publish
more geocode services.

7.

Click Next.

8.

Choose whether to publish the geocode service to an existing folder on your server, which includes the root level, or to a
new folder. It is common to publish to the root level.

9.

Click Continue.
The Service Editor dialog box appears.

10.

Click Item Description on the left pane.

Copyright 1995-2013 Esri. All rights reserved.

17

ArcGIS for Transportation Analytics

a.

Fill out the Summary and Tags sections.

11.

Click the Analyze button

12.

Examine the messages in the Prepare window and take appropriate action. Note that error messages require corrective
action; warning and information messages do not, but fixing them may improve service performance. Right-click a
message for recommended fixes and links to help documents.

13.

In the Service Editor dialog box, click Publish

14.

When the Succeeded dialog box appears, click OK.


The geocode service is available on your GIS server.

Test the geocode service (Optional)


Steps:
1.

Click Customize > Toolbars > Geocoding.


The Geocoding toolbar is added to ArcMap.

2.

Click the Select Address Locator drop-down list and choose <Manage Address Locators>.
The Address Locator Manager appears.

3.

Click Add.
The Add Address Locator dialog box appears.

4.

Choose GIS Servers from the Look in drop-down list.

5.

Double-click your GIS server, navigate to your geocode service, and click Add.

6.

Click Close to close the Address Locator Manager dialog box.

7.

In the Geocoding toolbar, click the Select Address Locator drop-down list and choose GeocodeService, or the name
you assigned to your service.

8.

Type a valid address in the Find Address text box on the Geocoding toolbar and press ENTER. The address should be
within the country or region of the locator you published.

9.

Once ArcGIS finds the address, right-click the Find Address text box and choose Zoom To.
The map extent centers on the address, and a point flashes where the address was located.

You have just published the third and final service Route Planner requires to work properly. If you have purchased the traffic option for
ArcGIS for Transportation Analytics you can set that up next; otherwise, you can configure Route Planner.

Copyright 1995-2013 Esri. All rights reserved.

18

ArcGIS for Transportation Analytics

Route Planner: Install and configure


The Route Planner is a powerful sample application that consumes your hosted VRP and Route services to optimally schedule work for
your fleet of vehicles. It is a fully featured sample application that can be used with minimal configuration to reference your services. A
Plug-In SDK is available for those who have programming skills and want to customize the application further.
Installing Route Planner follows the standard installation process of running an executable file and stepping through a short series of
dialog boxes. After Route Planner is installed, you need to point it to the services you published, such as the geocode and VRP services,
which Route Planner uses to find addresses, calculate best routes, and so on. An XML file provides information and directs Route Planner
to the various services it needs. You will edit the XML file to point to the services you created earlier and, optionally, to other services.

Installing and starting Route Planner


Steps:
1.

Open Windows Explorer and navigate to RoutePlannerSetup.exe, which is within the ArcGIS for Transportation Analytics
media under the Sample apps > RoutePlanner folders.

2.

Double-click RoutePlannerSetup.exe to open the installation wizard.

3.

Step though the wizard and start the installation process.

4.

Once Route Planner is installed, you can start the application by clicking Start > RoutePlanner > Route Planner.

Configure Route Planner to use your services


Route Planner doesn't perform the data- and processing-intensive work required to geocode, solve fleet-routing problems, track
vehicles, and so on; instead, it relies on web services. Now that you've installed Route Planner, you need to point the application to the
web services you've created so it knows where to send and receive information.
Route Planner references an XML file, services.xml, to see where the web services with which it should communicate are located. You
will edit the XML file to point Route Planner to the web services you've created.

Open services.xml
Steps:
1.

Open the text or XML editor of your choice. Common editors include Notepad, Notepad++, XMLSpy, and VisualStudio.

2.

Open services.xml in your editor. The default location of the file is C:\ProgramData\RoutePlanner. If you are
using Windows XP, however, the default location of the file is C:\Documents and Settings\All
Users\Application Data\RoutePlanner.
Tip: The directory in Windows XP may be hidden if you try to browse to it by clicking folders. To
avoid this potential problem, copy the path from this topic and paste it into the text box of the
browsing dialog box and press ENTER. The folder contents are normally displayed even if the
folder is marked as hidden.
Now that you are prepared to edit services.xml, continue through the subsequent sections of this help topic to configure
Route Planner to reference your services. When you are done, you will need to save your edits.

Edit <servers>
The <servers> element specifies the servers that host the web services Route Planner needs to function to its full capability. This
includes the primary routing and geocode services, as well as any auxiliary services such as map services hosted by ArcGIS.com.
The <servers> element is near the end of the document and is made up of a few <server> elements, which you will edit and
possibly add to. If you published all your Transportation Analytics services to a single server, you will need to have only one or two
<server> elements; however, if you published to multiple servers, you will need to add more.
Steps:
1.

Find the <servers> XML element.


Note that <servers> can contain multiple <server> XML elements, one for each server that you want Route Planner
to reference.

Copyright 1995-2013 Esri. All rights reserved.

19

ArcGIS for Transportation Analytics

2.

Find the XML comment that says <!-- Reference server where VRP, Route, & traffic services are
hosted here -->.

3.

Find the <server> element directly below the comment.

4.

Assuming you have your VRP and route services running on the same machine, type an identifying name for the server
in the name attribute of the <server> tag.
In the example below these steps, the identifying name is transport.
Tip: The servers you enter as <server> elements are referenced throughout the services.xml
file. The way the servers are identified in this file is through the name attribute on the
<server> element. Keep this in mind as you work through the rest of the help topic.

5.

If you've enabled security on your service, you'll need to set the authentication attribute to "yes"
(authentication="yes").
The <server> element needs to contain a <url> element that points to the URL of the GIS server.

6.

Edit the <url> element to reference the server hosting your route service.
For example, if your route service was published to a server named "transport", the updated <server> element would
look like the following:
<server name="transport" title="TA routing" description="The server is for routing operations." help="" authentication="no">
<url>http://transport:6080/arcgis/services</url>
</server>

7.

Although most deployments require only one server to be defined for Transportation Analytics services, you will need to
define more if any of your VRP, geocode, feature, or traffic services are being hosted on a different server than the
routing server you just defined. To define another server, duplicate the <server> element that you just edited, and
modify the duplicate element to point to another server. Repeat this process as necessary until all relevant servers are
defined.
Note: You may discover later that you need to add another server for Route Planner to reference. If
you do, you can come back to this section as a reference.

Now that you've indicated the servers where your Transportation Analytics services are located, you can edit the XML properties of
the services themselves.

Edit <vrp>
Steps:
1.

Find the <solve> XML element.


This element is broken down into elements for the route, VRP, and synchronous VRP services as well as one for solver
settings.

2.

Under <solve>, look for <vrp>, then <service>.

3.

Make sure that the server attribute value matches the name of the VRP server you defined in the <server> tag while
reading the "Edit <servers>" section of this help document.

4.

Type the REST and SOAP URLs of the VRP service into their respective <resturl> and <soapurl> elements.

When you are done, the <vrp> element should look like the one shown below, but your server name and the URLs could be
different, depending on your server name and whether you published the VRP service to the root level on your server or within a
folder. The example below was published to the root level.
<solve>
<vrp>
<service server="transport">
<title>VRP Service</title>
<resturl>https://transport:6080/arcgis/rest/service/VehicleRoutingProblem/GPServer</resturl>
<soapurl>https://transport:6080/arcgis/services/VehicleRoutingProblem/GPServer</soapurl>
<toolname>SolveVehicleRoutingProblem</toolname>
</service>
</vrp>
[...]
</solve>

Edit <syncvrp>
Steps:

Copyright 1995-2013 Esri. All rights reserved.

20

ArcGIS for Transportation Analytics

1.

Follow the steps in the last section again, except for the final step, type the URLs of the synchronous VRP service,
rather than the asynchronous VRP service, into the <resturl> and <soapurl> elements.

When you are done, the <syncvrp> element should look like the one shown below, but your server name attribute value and the
URLs could be different, depending on the name of your server and whether you published the synchronous VRP service to the
root level on your server or within a folder. The example below was published to the root level.
<solve>
[...]
<syncvrp>
<service server="transport">
<title>Synchronous VRP Service</title>
<resturl>https://transport:6080/arcgis/rest/services/VehicleRoutingProblemSync/GPServer</resturl>
<soapurl>https://transport:6080/arcgis/services/VehicleRoutingProblemSync/GPServer</soapurl>
<toolname>EditVehicleRoutingProblem</toolname>
</service>
</syncvrp>
[...]

Edit <routing>
Steps:
1.

Under <solve>, look for <routing>, then <service>.

2.

Make sure the server attribute value matches the name of the routing server you defined in the <server> tag while
reading the "Edit <servers>" section of this help document.

3.

Edit the <resturl> and <soapurl> elements to specify the respective REST and SOAP URLs of the routing service.

4.

Edit the <layername> element so that it matches the name of your route layer. Typically, the value is Route.

When you are done, the <routing> element should look like the one shown below, but your server name attribute value and the
URLs could be different, depending on the name of your server and whether you published the routing service to the root level on
your server or within a folder. The example below was published to the root level.
<solve>
[...]
<routing>
<service server="transport">
<title>Route Service</title>
<resturl>https://transport:6080/arcgis/rest/services/Route/NAServer</resturl>
<soapurl>https://transport:6080/arcgis/services/Route/MapServer/NAServer</soapurl>
<layername>Route</layername>
</service>
</routing>
[...]

Edit <tracking>
The tracking service stores information about routes, devices, and order status and serves as the hub which the Route Planner,
navigation, and dashboard applications use to send information to each other. If you've followed the documentation on publishing the
tracking service and named the tracking service accordingly, you can copy and paste the example below, then edit the server name to
match yours.
<tracking>
<trackingservice server="transport">
<resturl>http://transport:6080/arcgis/rest/services/WorkflowManagement</resturl>
</trackingservice>
<trackingsettings>
<BreakTolerance>30</BreakTolerance>
</trackingsettings>
</tracking>

If you won't be using feature services and WorkforceManagement, it's best to remove the entire <tracking></tracking> tag along with
all of its contents. This will prevent Route Planner from searching for a service that doesn't exist and throwing an error. If you choose
to do this, it is recommended that you make a backup of services.xml so that you can always add the tracking feature back in if you
choose to.

Edit <solversettings>
The <solversettings> element lets you specify the default values for properties that appear in the Preferences > Routing page
of Route Planner. It also lets you specify which routing and VRP restrictions are visible in the application.

Copyright 1995-2013 Esri. All rights reserved.

21

ArcGIS for Transportation Analytics

Note: Restrictions allow you to prohibit, avoid, or prefer travel on roads. Examples include prohibiting travel
along the wrong way of a one-way road, preferring truck routes when driving a truck, and avoiding toll
roads if the alternative route isn't too far.
There may be many restrictions in the network dataset, and reading through them can take time. If you
know some restrictions are irrelevant to your operation, you can hide them from your Route Planner
users by setting the editable XML attribute of the restrictions listed in the services.xml file to false.
Steps:
1.

Find the <solversettings> XML element.


The first set of elements under <solversettings>, which includes <maxordercountforsyncvrp> and
<excluderestrictedstreets>, allow you to set default values for the routing preferences in Route Planner.
The second set of elements include restrictions and the attribute parameters for adjusting how network costs are
calculated and determining whether restrictions are relevant based on vehicle characteristics.

2.

Optionally, edit the XML elements relating to the default routing-preference settings.

3.

Find the <restrictions> XML element.

4.

Choose whether to use individual restrictions by default and whether to make them visible in the Route Planner user
interface, then edit their corresponding <restriction> XML elements.
To use a restriction by default, set the turnedon attribute to true (turndedon="true").

To hide a restriction so it can't be viewed or edited in Route Planner, set editable equal to false
(editable="false").

The NAVTEQ network dataset included with Transportation Analytics has various restrictions. By default, the Route
Planner services.xml file enables and makes visible only the more commonly used restrictions.
The following example enforces the Oneway restriction, which means that one-way roads are obeyed by default. It also
hides the restriction from the Route Planner user interface so that one-way roads are always respected by the routes
generated in Route Planner.
<restriction name="Oneway" turnedon="true" editable="false" description="One way road enforcement, leave on!"/>

Edit <map>
The default configuration of the XML file is to use ArcGIS Online map services for the basemaps on which your fleet routing problems
and solutions are displayed. These maps provide context, for instance, to let you see the cities, rivers, and streets around your routes.
If you would like to reference you own basemaps, you need to publish and host them as map services, then configure services.xml to
reference them.
In the example below, the National Geographic basemap, which is available on ArcGIS.com, is added. Once the file is saved and
Route Planner opened, the National Geographic basemap will be available for viewing in the maps.
<map>

[...]
<service type="ArcGISCached" server="server.arcgisonline.com" basemap="true" visible="true">
<name>National Geographic</name>
<title>National Geographic</title>
<soapurl>https://server.arcgisonline.com/arcgis/services/NatGeo_World_Map/MapServer</soapurl>
<opacity>1</opacity>
</service>
</map>

Edit <geocoding>
You may have published your own geocode service in a prior help topic. Now, you will configure services.xml to reference the service.
Steps:
1.

Find the <geocoding> XML element.

2.

Make sure that the type attribute of the <service> tag is set to "ArcGIS.Streets".

3.

Make sure that the server attribute value matches the name of the geocode server you defined in the <server> tag
while reading the "Edit <servers>" section of this help document.

4.

If the opening and closing <resturl> tags are present, comment them out by typing <!-- before the opening tag and
--> after the closing tag as shown in the example below.
<!-- <resturl> [...] </resturl> -->

Copyright 1995-2013 Esri. All rights reserved.

22

ArcGIS for Transportation Analytics

REST endpoints are used with ArcGIS.com geocode services only. You will use SOAP endpoints.
5.

Add <soapurl> </soapurl> to a new line below the one you just commented out.

6.

Type the SOAP endpoint of your geocode service between the <soapurl> tags.

7.

Make sure that the <usesinglelineinput> element contains true.

8.

Also make sure that the locatorfield attribute for the Single Line Address field mapping is correct. This should usually be
named SingleLine, but it's best to double-check.

For example, if your geocode service was published to a server named "transport", the updated <server> element would look like
the following:

<geocoding>
<service type="ArcGIS.Streets" server="sample.arcgisonline.com" current="true">
<title>Address Geocoding</title>
<soapurl>http://transport:6080/ArcGIS/services/USA_2012R1_NT_Composite/GeocodeServer</soapurl>
<inputfieldmapping>
<fieldmap visible="true" description="The address for the order." locatorfield="Address" addressfield="AddressLine"/>
<fieldmap visible="true" description="The city for the order or location for the stop." locatorfield="City" addressfield="Locality3"/>
<fieldmap visible="true" description="The state for the order or location for the stop." locatorfield="State" addressfield="StateProvince
<fieldmap visible="true" description="The 5-digit ZIP Code for the order or location for the stop." locatorfield="Zip" addressfield="Post
<fieldmap visible="true" description="Single Line Address" locatorfield="SingleLine" addressfield="FullAddress"/>
</inputfieldmapping>
<usesinglelineinput>true</usesinglelineinput>
<minimumcandidatescore>40</minimumcandidatescore>
<minimummatchscore>80</minimummatchscore>
</service>
</geocoding>

Save your edits to services.xml


Use your text or XML editor to save the changes you have made to services.xml.
Note that if you make changes to this file while Route Planner is open, you will need to close Route Planner, then reopen it, to see the
effects of the changes.

Developer tools
Route Planner includes source code and a documented Plug-In SDK if you'd like to extend or further customize its functionality. Most
tasks, such as enterprise database input/output, can be accomplished using the Plug-In SDK.
See the RoutePlanner_DeveloperTools folder in the Transportation Analytics bundle for tools and documentation.

Copyright 1995-2013 Esri. All rights reserved.

23

ArcGIS for Transportation Analytics

Set up the enterprise geodatabase


ArcGIS for Transportation Analytics requires an enterprise geodatabase to enable the feature service for workforce management and to
store traffic incidents available with the traffic add-on. This section lists the steps to set up an enterprise geodatabase accessible from
ArcGIS for Server. You will create an enterprise geodatabase in a relational database management system (RDBMS), add a database
user who owns feature classes and tables in the enterprise geodatabase, and create a connection file to reference the enterprise
geodatabase when you publish services.
Before you can create and set up an enterprise geodatabase, an RDBMS must be already installed on the server machine. These steps
assume the RDBMS is SQL Server Standard Edition and that you also have the credentials for the database administrator user for the
RDBMS.
Caution: The steps in this topic are written specifically for creating a geodatabase in a SQL Server database. You are
not required to use SQL Server, however; you can use Oracle or PostgreSQL instead.
The steps to create an enterprise geodatabase in Oracle and PostgreSQL are similar to those for creating
one in SQL Server. Regardless of the DBMS you have access to, try to follow the steps in this topic. If you
have questions along the way, you can read additional help resources. Specifically, the geoprocessing tools
you will use to create the geodatabase have side-panel and tool help. To access the side-panel help, open a
tool dialog box and click Show Help. Click a parameter in the tool dialog box to see content in the sidepanel relevant to that parameter. Then, to access the tool help, click Tool Help.

Create an enterprise geodatabase


You will use the Create Enterprise Geodatabase geoprocessing tool to complete this task.
Steps:
1.

Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.1.

2.

Click the Catalog Window button

3.

In the Catalog window, expand Toolboxes > System Toolboxes > Data Management Tools > Geodatabase
Administration.

4.

Double-click Create Enterprise Geodatabase.


The Create Enterprise Geodatabase tool dialog box opens.

5.

Fill out the parameters of the tool. Use the substeps below as a guide.

on the Standard toolbar to open the Catalog window.

Tip: You may need to choose values for parameters other than the ones shown below. To help you
decide, click Show Help to see help for the parameters you click in the tool dialog box.
a.

From the Database Platform drop-down list, choose SQL_Server. (Remember that you can use Oracle or
PostgreSQL instead.)

b.

For the Instance parameter, type the name of the SQL Server instance.

c.

In Database, specify the name of the database to create, such as geodata.

d.

Uncheck Operating System Authentication to use database authentication instead.

e.

Type a database administrator user into the Database Administrator parameter.

f.

Type the password of the database administrator user you specified in the previous substep.

g.

Check Sde owned schema.

h.

Assign a geodatabase administrator password in the Geodatabase Administrator Password parameter.

i.

For Authorization File, type the path to the keycodes file on the GIS server. This file is stored by default to
C:\Program Files\ESRI\License10.1\sysgen\keycodes.

Copyright 1995-2013 Esri. All rights reserved.

24

ArcGIS for Transportation Analytics

6.

Click OK.
The tool executes and an enterprise geodatabase is created on the GIS server.

Create a database connection


In the steps below, you will create a database connection file for the enterprise geodatabase created earlier using the database
administrator user. This file will be used to create a database user who owns the feature classes and tables in the enterprise
geodatabase.
Steps:
1.

In the Catalog window, expand Toolboxes > System Toolboxes > Data Management Tools > Workspace.

2.

Double-click Create Database Connection.


The Create Database Connection tool dialog box opens.

3.

Fill out the parameters of the tool. Use the substeps below as a guide.
Tip: You may need to choose values for parameters other than the ones shown below. To help you
decide, click Show Help to see help for the parameters you click in the tool dialog box.
a.

In the Connection File Location parameter, type a folder path indicating where the output connection file will be
stored. Optionally, browse to the folder using the browse button. The folder must already exist or an error will be
reported.

b.

Specify a name for the connection file in the Connection File Name parameter. To easily identify the important
properties of the connection file, you should include the user, database, and instance names in the file name, for
example, sa_geodata_indore, where sa is the user name, geodata is the database, and indore is the instance.

c.

For Database Platform, choose SQL_Server. (Remember that you can use Oracle or PostgreSQL instead.)

d.

Specify the instance or server name in Instance.

e.

Choose whether to check Database Authentication.

f.

If you checked Database Authentication, fill out the Username and Password parameters.

g.

Choose whether to check Save username and password.

h.

For the Database parameter, select the enterprise geodatabase you created in the last section of this topic.

Copyright 1995-2013 Esri. All rights reserved.

25

ArcGIS for Transportation Analytics

4.

Click OK.
The tool executes and the connection file is created in the location you specified.

Create a database user


In this section, you will create a database user in the enterprise geodatabase who owns the feature classes and tables.
Steps:
1.

In the Catalog window, expand Toolboxes > System Toolboxes > Data Management Tools > Geodatabase
Administration.

2.

Double-click Create Database User.


The Create Database User tool dialog box opens.

3.

Fill out the parameters of the tool. Use the substeps below as a guide.
Tip: You may need to choose values for parameters other than the ones shown below. To help you
decide, click Show Help to see help for the parameters you click in the tool dialog box.

4.

a.

For Input Database Connection, specify the database connection file you created in the previous section of this
topic.

b.

Choose whether to check Create Operating System Authenticated User.

c.

Type a user name in Database User. The example below uses ata, which is short for ArcGIS for Transportation
Analytics.

d.

Type a password for the user in Database User Password.

Click OK.

Copyright 1995-2013 Esri. All rights reserved.

26

ArcGIS for Transportation Analytics

Create a database connection for the new user


Now, you will create a database connection file to connect to the enterprise geodatabase using the credentials of the database user you
just created. You will create tables and feature classes in the enterprise geodatabase using this file. Later, ArcGIS for Server will access
the tables and feature classes with the same file.
Note: The approach outlined in this tutorial is used to simplify the workflow. For data-security reasons, you may
want to give the user privileges to connect to the database only, and privileges on the data to insert,
update, and delete records.
Steps:
1.

In the Catalog window, expand Toolboxes > System Toolboxes > Data Management Tools > Workspace.

2.

Double-click Create Database Connection.


The Create Database Connection tool dialog box opens.

3.

Fill out the parameters of the tool. Use the substeps below as a guide.
Tip: You may need to choose values for parameters other than the ones shown below. To help you
decide, click Show Help to see help for the parameters you click in the tool dialog box.

4.

a.

In the Connection File Location parameter, enter a folder path where the output connection file will be saved.

b.

Type a name for the file in the Connection File Name parameter. To easily identify the important properties of
the connection file, you should include the user, database, and instance names in the file name, for example,
sa_geodata_indore, where sa is the user name, geodata is the database, and indore is the instance.

c.

For Database Platform, choose SQL_Server. (Remember that you can use Oracle or PostgreSQL instead.)

d.

Specify your instance or server name in Instance.

e.

Choose whether to check Database Authentication.

f.

If you checked Database Authentication, fill out the Username and Password parameters.

g.

Choose whether to check Save username and password.

h.

For the Database parameter, select the enterprise geodatabase you created earlier in this topic.

Click OK.
The tool executes and the database connection file is created in the location you specified.

Register the geodatabase with ArcGIS for Server


In this section, you will register the enterprise geodatabase with ArcGIS for Server so it can be used by the services.
Steps:

Copyright 1995-2013 Esri. All rights reserved.

27

ArcGIS for Transportation Analytics

1.

From the Catalog window, create a new administrator connection to your GIS server if you don't already have an
administrator connection. You start this process by expanding the GIS Servers node and double-clicking Add ArcGIS
Server.

2.

After you make the server connection, it appears on the bottom of the list under GIS Servers. There may be more than
one connection to the server at this point. Right-click on the connection to your server that ends in (admin) and choose
Server Properties.

3.

Click the Data Store tab.

4.

In the Registered Database section, click the Add button


The Register Database dialog box appears.

5.

Specify a name in the Name text box. Any descriptive name that helps you remember that the geodatabase contains data
for your Transportation Analytics services will work.

6.

In the Publisher database connection text box, click Import.


The Browse for a Database Connection dialog box opens.

7.

Choose the database connection file you created in the previous section of this topic and click Select. Make sure you
choose the connection file that allows access to the enterprise geodatabase using the credentials of the database user,
not the administrator.
The Browse for a Database Connection dialog box closes.

8.

Under Server folder path in the Register Database dialog box, check Same as publisher database connection if it's
not already checked. This option means the path is exactly the same for the ArcGIS for Desktop and ArcGIS for Server
machines.

9.

Click OK.
The Register Folder dialog box closes.

You should now have the database registered with the server as well as the folder you created earlier while setting up the
street data.

10.

Click OK.

Copyright 1995-2013 Esri. All rights reserved.

28

ArcGIS for Transportation Analytics

The ArcGIS Server Properties dialog box closes.

Copyright 1995-2013 Esri. All rights reserved.

29

ArcGIS for Transportation Analytics

Publish the Workforce Management feature service


This topic lists the steps to publish the Workforce Management feature service, which receives and shares information, such as work
orders to drivers and vehicle locations to managers.
To publish this feature service, the first step is to copy the tables and feature class to fuse in the feature service to the enterprise
geodatabase you set up in Create the enterprise geodatabase. The second step is publishing.

Export data to the enterprise geodatabase


Steps:
1.

Copy the WorkforceManagementSystemData geodatabase to any folder on your machine. The


WorkforceManagementSystemData.gdb is located in the Sample Apps > WorkforceManagement folder from the sample
apps download.

2.

Start ArcMap.

3.

In the Catalog window, click WorkforceManagementSystemData.gdb to select it.

4.

Click the Toggle Contents Panel button until both the catalog tree and the content panel are visible as shown below. The
content panel lists all the feature classes and tables from WorkforceManagementSystemData.gdb

5.

In the content panel, select all the feature classes (Devices, LineBarriers, PointBarriers, PolygonBarriers, Routes, and
Stops).

6.

Right-click the selected feature classes, then click Export > To Geodatabase (multiple).
The Feature Class to Feature Class (multiple) tool dialog box appears.

7.

Click the browse button on the Output Geodatabase parameter and select the connection file that makes a user
connection to the enterprise geodatabase. Make sure you choose the connection file that connects as a database user,
not as an administrator. You created this file in the Create a database user section of the Create the enterprise
geodatabase topic.

8.

Click OK.

Copyright 1995-2013 Esri. All rights reserved.

30

ArcGIS for Transportation Analytics

The tool exports the feature classes to the enterprise geodatabase. Next, you will export the tables.
9.

In the content panel, select the tables (Events and Settings).

10.

Right-click the selected tables and choose Export > To Geodatabase (multiple) from the context menu.
TheTable to Geodatabase (multiple) tool dialog box opens.

11.

Click the browse button on the Output Geodatabase parameter and select the same user connection file that you chose
when exporting the feature classes.

12.

Click OK.
The tables are exported to the enterprise geodatabase.

Publish the feature service


In the next steps, you will add the exported feature classes and tables to ArcMap and publish the feature service.
Steps:
1.

Click the Add Data button .


The Add Data dialog box opens.

2.

Browse to the same database connection file that you used to export the tables and feature classes. Again, make sure you
choose the connection file that connects as a database user, not as an administrator.
The contents of the enterprise geodatabase are shown in the Add Data dialog box. This should consist of the tables and
feature classes you exported.

3.

Select the contents by pressing SHIFT and clicking the top and bottom entry, then click Add.
The tables and feature classes are added to the Table of Contents window.
If the layer and table names may be prefixed with database-identifying information (database.user.layername), you will
need to edit the names so that they once again are just dDevices, Stops, Routes, and so on. Failure to do so may result in
problems when the sample applications try to write to the feature service.

4.

For each layer and table in the table of contents, remove the database and user information from the name.
a. Double-click the name to open the Layer Properties dialog box.
b.

Click the General tab.

c.

Edit the Layer Name property so that database.user.layername becomes layername.

d.

Click OK to close the Layer Properties dialog box.

5.

From the main menu, click File > Map Document Properties to open the Map Document Properties dialog box.

6.

Fill in the Title, Summary, Description, Author, Credits, and Tags boxes. This is required to successfully publish the
map document as a feature service. Click OK.

7.

Save the map document. In this example the document is saved at


[...]\ArcGISForTAServices\WorkforceManagement\WorkforceManagement.mxd.

8.

Click File > Share As > Service.


The Share as Service wizard opens.

9.

Make sure Publish a Service is selected in the first panel and click Next.

10.

From the Choose a connection drop-down list, choose the publisher or administrator server connection to which you are
publishing the feature service. Alternatively, click the button to the right of the drop-down list to create a connection.

Copyright 1995-2013 Esri. All rights reserved.

31

ArcGIS for Transportation Analytics

11.

Type WorkforceManagement into the Service name text box.

12.

Click Next.

13.

Choose whether to publish the feature service to an existing folder on your server, which includes the root level, or to a
new folder. It is common to publish to the root level.

14.

Click Continue.
The Service Editor dialog box opens.

15.

Click Capabilities, which is on the left pane.


a. Uncheck KML.
b.

Check Feature Access. This indicates you want to publish a feature service.

16.

Click Pooling, which is on the left pane, and specify the minimum and maximum number of instances per machine. For
optimal throughput, the recommended minimum and maximum values should be equal to the number of cores on the
server machine.

17.

Click the Analyze button

18.

Examine the messages in the Prepare window and take appropriate action. Make sure that there are no messages
indicating that any layers or tables from the map document will be copied to the server. (If you have a message like this,
you will need to register the enterprise geodatabase with the server.
Note that error messages require corrective action, while warning and information messages do not, but fixing them may
improve service performance. You can right-click a message for recommended and automated fixes and links to help
documents.

19.

In the Service Editor dialog box, click Publish

20.

Close the map document.

Copyright 1995-2013 Esri. All rights reserved.

, which is near the top of the Service Editor dialog box.

32

ArcGIS for Transportation Analytics

Configure Workforce Management


The ArcGIS for Transportation Analytics bundle provides services and sample applications that allow you to build routes for your fleet,
navigate field workers to their destinations, and update order statuses on a web-based dashboard. Using your published services and the
provided sample apps, you can publish a feature service on ArcGIS for Server and communicate information about your vehicles, routes,
order statuses, and more. The workflow is depicted below.
Note: The sample apps, including Workforce Management, are not intended to be a complete solution to fulfill the
needs of all users. It is likely the sample apps will need to be enhanced by adding plug-ins or modifying
source code to meet the needs of your organization. Alternatively, you can build or modify your own
applications to work with the Transportation Analytics services as well as your enterprise databases.

Please see the individual data setup and service publishing guides as well as sample app configuration documents to deploy all the
components you'll need. These include:
Route Planner: Consuming VRP, Route, and Geocode services and sending orders to feature service

Status Dashboard: Consuming feature and route services

Navigation applications: Consuming Route services and sending location and order status updates to feature services

Once you've configured all the components and built routes in Route Planner, follow the steps below.
1. In Route Planner, browse to the Setup tab, create a mobile device for each of your drivers on the Mobile Devices panel, then
give them a Sync Type of WMServer. If you have a large number of mobile devices, you can import them from a spreadsheet,
text file, or database.

2.

In Route Planner, assign mobile devices to either drivers or vehicles. Typically, mobile devices such as cell phones stay with the
driver while other devices may be permanently mounted in vehicles. Below, browse to the Setup tab and Drivers panel and
assign mobile devices to each driver. Again, if you have a large number of drivers, you can import them from a spreadsheet, text
file, or database.

3.

Now, when you build routes on the Schedule tab in Route Planner, you can send these routes to the feature service where mobile
devices will poll for new work.

Copyright 1995-2013 Esri. All rights reserved.

33

ArcGIS for Transportation Analytics

4.

In your Navigation application, log in with your mobile device ID and also specify credentials if necessary. In the Windows
Navigator, go to Menu > Settings > Get Route. In the iOS Navigator, tap on the gear icon for Settings, then click Login.

5.

For the Status Dashboard, see its installation and configuration document for details on how to configure which vehicles to track.

Copyright 1995-2013 Esri. All rights reserved.

34

ArcGIS for Transportation Analytics

Dashboard sample app: install and configure


The Dashboard is a powerful sample application that allows you to track vehicle positions on a map, receive status updates relating to
stops and orders, and monitor predefined alerts associated with each route.

Install
Steps:
1.

Download the ArcGIS for Transportation Analytics sample applications and browse to SampleApps >
Dashboard_Sample.

2.

Unzip and copy the contents to your web server root directory. For IIS, this would be C:\inetpub\wwwroot.
This will place the following folder in your web server root:
tasa: the dashboard application

3.

On Windows Server, verify the folder is not encrypted.


a. Right-click the folder and choose Properties.

4.

b.

Click Advanced.

c.

Uncheck Encrypt contents to secure data.

d.

Click OK to close the dialog boxes and confirm all attribute changes to the folder, subfolder, and files.

Proxy files will also be placed at your web server root.


Both PHP (proxy.php) and ASP.NET pages (proxy.ashx and proxy.config) will be placed there. Below, you'll walk through
configuring an IIS deployment. For PHP, please reference the Esri Javascript API Resource Center and read Using the
Proxy Page.

Configure
Steps:
1.

Configure the proxy page for use according to your web server environment.
a. For IIS, open proxy.config in a text editor.
b.

2.

Add a serverURL XML node that references your instance of ArcGIS for Server which is hosting your workforce
management services: <serverUrl url="http://localhost/arcgis/rest/services"
matchAll="true" />.

Open tasa/config.js in a text editor.


a. Change the Host parameter to the machine name of the ArcGIS Server hosting the Workforce Management
services.
b.

Change the references to the layers so each layer points to the correct REST endpoint of your ArcGIS Server
hosting the Workforce Management feature services. If Orders are layer 2 on your REST services page, ensure
they are in this file as well.

c.

Locate the deviceIDs key and enter in the mobile device IDs you want to track. Multiple IDs can be specified by
separating them with commas, for example, [1234, 5678].

d.

Refer to the comments in config.js to make any additional changes.

3.

Open tasa/app.js, locate the line of code that references the proxy.ashx page, then verify that it is pointing to your local
proxy page.
Example: esri.config.defaults.proxyUrl = ../../proxy.ashx

4.

Load the dashboard in a web browser.


For IIS, this might look like http://localhost/tasa/dashboard.html.

Notes
The tasa/index.html page is included as a quick way to load multiple routes and simulate their movement using an In-App simulator.
This is an optional step that eases the loading of specific routes by reading directly from the Workforce Management services to retrieve
work for mobile devices.

Copyright 1995-2013 Esri. All rights reserved.

35

ArcGIS for Transportation Analytics

Developer tools and resources

ArcGIS API for Javascript resource center: http://help.arcgis.com/en/webapi/javascript/arcgis/

Dojo AMD and Modules: http://dojotoolkit.org/documentation/tutorials/1.7/modules/

Using custom modules with a CDN: http://dojotoolkit.org/documentation/tutorials/1.7/cdn/

Automatic download with CPM: https://github.com/SitePen/dgrid#automatic-download-with-cpm

Dojo dGrid: In beta as of June 1, 2012

Inline Javascript Manual Setup: https://github.com/SitePen/dgrid#manual-download

Home Page: http://dojofoundation.org/packages/dgrid/

Project Page (GitHub): https://github.com/SitePen/dgrid

Samples: http://sitepen.github.com/dgrid/dgrid/test/

SitePen Blog Post: http://www.sitepen.com/blog/2012/04/24/dgrid-getting-down-to-the-nitty-griddy/

After deploying your web dashboard, you should be able to use it with the other sample apps to track your vehicles and order statuses
throughout the workday.

Copyright 1995-2013 Esri. All rights reserved.

36

ArcGIS for Transportation Analytics

Set up the live traffic feed


ArcGIS for Transportation Analytics services can optionally support live traffic for routing and visualization. The network dataset used by
the Transportation Analytics services needs to be configured with a live traffic feed to support this functionality. The following steps explain
how to set up a live traffic feed and configure the network dataset to use the feed.
Caution: Configuring the network dataset should be done before publishing any services; otherwise, the running
services lock the network dataset. You would need to stop the services that reference the network dataset to
unlock it so it can be modified.
A live traffic feed downloads traffic speed data from a data vendor, such as NAVTEQ, at regular intervals and converts the traffic flow data
into a binary format that can be used by the network dataset. ArcGIS provides two geoprocessing tools for this purpose: Update Traffic
Data and Update Traffic Incidents. In order to download the traffic data and traffic incidents, you need to have a user name and password
to access a data vendor's data feeds. These logon credentials are provided to you when you purchase the ArcGIS for Transportation
Analytics Traffic add-on.
In the step-by-step instructions below, you will do the following:
Set up geoprocessing models that call the Update Traffic Data and Update Traffic Incidents tools.

Execute the geoprocessing models from a Python script.

Set up a task in Windows Task Scheduler to run the Python script at scheduled intervals.

Set up the Traffic Data model tool


Steps:
1.

Copy the TrafficTools.tbx and DownloadTraffic.py files from ArcGIS.com or the Transportation Analytics FTP site to a
folder on your machine. In the example shown in this topic, the files are copied to
F:\ArcGISForTAServices\Traffic.

2.

Start ArcMap.

3.

In the Catalog window, browse to and click TrafficTools.tbx, which you copied in the previous step.
You may need to make a folder connection to access the folder into which you copied the files.

4.

Expand TrafficTools.tbx, right-click the Download Traffic Data model tool, and select Edit.
The Download Traffic Data ModelBuilder window opens.

5.

Double-click Update Traffic Data.


The Update Traffic Data tool dialog box opens.

6.

Click Show Help to see parameter-specific documentation in the side panel.

7.

Fill out the tool dialog box. Use the substeps below and the side-panel help as a reference.
a. For Provider, select a provider for your area.
b.

For User Name, specify the user name provided with your traffic add-on.

c.

For Password, specify the password provided with your traffic add-on.

d.

For Regions, select the regions for which you want to download traffic data. This should overlap the region of
your Transportation Analytics network dataset.

e.

For Traffic Data Output Folder, specify an existing folder on your machine, such as
F:\ArcGISForTAServices\Traffic\TrafficData. The network dataset will read the traffic files from this
folder, so the folder should allow at least read permissions to everyone.

f.

For Expected Update Interval in Minutes, specify the interval after which a new traffic file will be downloaded.
In other words, how often do you want traffic speeds to be updated? Common values for this property are 5, 10,
or 15 minutes. You need to balance getting the most up-to-date traffic-speed information with how much data can
be feasibly downloaded within the interval.
Tip: Make a note of the Expected Update Interval in Minutes value; it will be required when
you create a task in the task scheduler.

g.

For Maximum File Age in Minutes, specify the time interval after which the traffic files are automatically deleted.
The default is to keep traffic files for 12 hours (720 minutes).

Copyright 1995-2013 Esri. All rights reserved.

37

ArcGIS for Transportation Analytics

You may want to keep a record of what live traffic speeds were like at a given time. You can store the files for as
long as you like, but they occupy disk space, which can add up over time, and quickly for large regions.

h.
8.

Click OK.

Save the model and close the Download Traffic Data ModelBuilder window.

Set up the Traffic Incidents model tool


The steps in this section are similar to those in the last section, but here you will work with traffic incidents, which are point features.
Also, the tool's output feature class needs to go into the enterprise geodatabase you previously created.
Steps:
1.

In the Catalog window under TrafficTools.tbx, right-click the Download Traffic Incidents model tool, and select Edit.
The Download Traffic Incidents ModelBuilder window opens.

2.

Double-click Update Traffic Incidents.


The Update Traffic Incidents tool dialog box opens.

3.

Fill out the tool dialog box. Use the substeps below and the side-panel help as a reference.
a. For Provider, select a provider for your area.
b.

For User Name, specify the user name provided with your traffic add-on.

c.

For Password, specify the password provided with your traffic add-on.

d.

For Regions, select the regions for which you want to download traffic incident data.

e.

For Incidents Feature Class Location, specify the database connection file that connects to the enterprise
geodatabase as the database user (not as the administrator). You created this file in the Create a database user
section of the Create the enterprise geodatabase.

f.

For Incidents Feature Class Name, specify a name, such as TrafficIncidents.

g.

For Time Zone Boundaries, specify the time zone boundaries feature class, which is in the file geodatabase that
contains the Transportation Analytics network dataset.
In the graphic below, the feature class is at
D:\Services\SharedData\NorthAmerica.gdb\TimeZoneBoundaries.

h.

For Time Zone ID Field, select the field name that contains the time zone names. This may be MSTIMEZONE
for your data.

Copyright 1995-2013 Esri. All rights reserved.

38

ArcGIS for Transportation Analytics

i.
4.

Click OK.

Save the model and close the Download Traffic Data ModelBuilder window.

Test the two model tools


Now, you will verify the models run successfully from a Python script because, later, you will schedule the Python script to run the
models automatically at regular intervals.
Steps:
1.

Open a command window.

2.

Execute the DownloadTraffic.py script, as demonstrated in the substeps and graphic below. Make sure that you use the
64-bit Python interpreter to execute the script for best performance. This can be achieved by using the full path to the
64-bit Python interpreter when executing the script.
a. Type the drive that you copied DownloadTraffic.py to, type a colon, then press ENTER. For example, if the file is
in a folder on the F drive, type F:.
b.

Type cd, followed by a space and the path to the folder that contains the DownloadTraffic.py file, then press
ENTER.
Example: cd ArcGISForTAServices\Traffic

c.

Type the path to, and the file name of, the 64-bit python.exe file. Press the SPACE bar. Type
DownloadTraffic.py. Press ENTER and verify the script ran successfully.
The python.exe file is located by default in C:\Python27\ArcGISx6410.1.
Example: C:\Python27\ArcGISx6410.1 DownloadTraffic.py

Copyright 1995-2013 Esri. All rights reserved.

39

ArcGIS for Transportation Analytics

Run the tools automatically at regular intervals


The DownloadTraffic.py script needs to run at regular intervals so the traffic speed data and traffic incidents remain current. You will set
up a task in Windows Task Scheduler to make this happen.
Steps:
1.

Open the Windows Task Scheduler by typing Task Scheduler in the Windows search box and pressing ENTER.

2.

Click Task Scheduler Library.

3.

On the Actions pane, click Create Basic Task.


The Create Basic Task Wizard opens.

4.

Type a name and, optionally, a description for the task; for example, "DownloadTraffic" for the name, and "Downloads
traffic at regular intervals to support Transportation Analytics services" for the description.

5.

Click Next.
The Task Trigger page is displayed.

6.

Under When do you want the task to start?, click One time.

7.

Click Next.
The One Time page is displayed.

8.

Specify a date and time to begin downloading traffic data. The current time is appropriate in most cases.

9.

Click Next.
The Action page is displayed.

10.

Under What action do you want the task to perform?, click Start a program.

11.

Click Next.
The Start a Program page is displayed.

12.

Click Browse, which is next to the Program/script text box, and select the 64-bit Python interpreter executable
(python.exe). This file was referenced earlier in the command line and is often found in the following location:
C:\Python27\ArcGISx6410.1\python.exe.

13.

In the Add arguments text box, type the full folder path to the DownloadTraffic.py file and enclose the path in quotation
marks (").
Example: "F:\ArcGISForTAServices\Traffic\DownloadTraffic.py"

14.

Click Next.
The Summary page is displayed.

15.

Check Open the Properties dialog for this task when I click Finish.

Copyright 1995-2013 Esri. All rights reserved.

40

ArcGIS for Transportation Analytics

16.

Click Finish.
The dialog box with the task's properties is displayed.

17.

Click the Triggers tab.

18.

Click the One time trigger and click Edit.


The Edit Trigger dialog box appears.

19.

In the Advanced Settings frame, check Repeat task every, then choose from the drop-down list the same value that you
set in the DownloadTrafficData model tool for the Expected Update Interval in Minutes parameter. Common values for
this property are 5, 10, or 15 minutes.

20.

Choose Indefinitely from the for a duration of drop-down list.


If you are testing the traffic service and want it to stop soon, you should select a smaller duration such as 1 day.

21.

Click OK.
The Edit Trigger dialog box closes.

22.

Click OK.
The task properties dialog box closes.

23.

As a test to check if the traffic feed is set up correctly, wait a few intervals and make sure that the folder location specified
in the Output Traffic Data Folder parameter of the DownloadTrafficData tool has new traffic files, which have the suffix of
.dtf.

24.

Close Task Scheduler.

A window will appear and stay open whenever the DownloadTraffic script is running. New traffic files will be created in the output
traffic data folder you specified. The traffic files will remain there until the script runs again and sees that a traffic file has been in the
output folder longer than the duration specified in the Update Traffic Data tool's Maximum File Age in Minutes parameter. If the
traffic file's lifetime is longer than the maximum, the file is deleted.

Configure the network dataset to use the live traffic feed


Now that live traffic data is downloading automatically, you need to configure the network dataset to read the data.
Steps:
1.

Start ArcMap.

2.

In the Catalog window, navigate to the file geodatabase you received with ArcGIS for Transportation Analytics, then
expand the Routing feature dataset.

3.

Right-click the network dataset and choose Properties.


The Network Dataset Properties dialog box opens.

4.

Click the Traffic tab.

5.

In Live Traffic: Streets-TMC Table section, click Traffic Feed location to select it.
An ellipsis button appears on the far right side.

Copyright 1995-2013 Esri. All rights reserved.

41

ArcGIS for Transportation Analytics

If the ellipsis doesn't appear, the network dataset could be in read-only mode. This could happen for one of two likely
reasons: one, the Network Analyst extension isn't enabled; two, the extension is enabled, but the network dataset is being
used by something or someone else (this includes the route and VRP services Transportation Analytics requires). If you
have a route or VRP service that references the same network dataset, you will need to stop the services before you can
finish this help topic. You can do this by following the substeps below.
a.

Click Start > All Programs > ArcGIS > ArcGIS 10.1 for Server > Manager.
ArcGIS Server Manager opens in a browser.

b.

Enter your login credentials and click Login.

c.

Click Services at the top of the page.

d.

The site's services on the root level are shown.

e.

Stop any services that are referencing the Transportation Analytics network dataset by clicking the stop button to
the right of the service overview.

f.

Use the navigation pane on the left side of the page to open folders on the server and stop any other services
that use the Transportation Analytics network dataset.

g.

Leave Manager open because you will need to start the services again shortly, but close ArcMap.

h.

Return to step 1 of this section of the help document and retry editing the Network Dataset Properties dialog
box.

6.

Click the ellipsis.


The Live Traffic Feed Location dialog box opens.

7.

Click Folder.

8.

Type or browse to the folder that contains the live traffic (.dtf) files. These files will be inside of a v1 folder; for example,
F:\ArcGISForTAServices\Traffic\TrafficData\v1.

9.

Click Validate to make sure that the traffic feed location is valid.

10.

Click OK on the Traffic Feed Location dialog box.


The Traffic Feed Location property should show the folder path to your traffic files.

11.

Click OK on the Network Dataset Properties dialog box.

12.

If you stopped any services, you should restart them.


a. Switch to ArcGIS Server Manager, which you left open in a web browser.
b.

Click Services at the top of the page.

c.

The site's services on the root level are shown.

Copyright 1995-2013 Esri. All rights reserved.

42

ArcGIS for Transportation Analytics

d.

Start any services you previously stopped. You can start them by clicking the start button to the right of the
service overview.

e.

Close ArcGIS Server Manager.

In this topic, you did the following:


Changed properties on a model tool so that traffic files could be downloaded from a data vendor to a folder of your choice

Created a task in Windows to run a script so that live traffic files are downloaded at regular intervals and kept up-to-date

Linked the network dataset to the folder where the live traffic files are stored

Copyright 1995-2013 Esri. All rights reserved.

43

ArcGIS for Transportation Analytics

Publish the traffic map service


This topic lists the steps to publish the traffic map service. The traffic map service lets you visualize traffic speeds as well as traffic
incidents.

In this help topic, you will add to ArcMap the network dataset that you configured with live traffic so you can visualize current travel
speeds. You will also add live traffic incidents as a layer and, finally, publish the map as a service. The resultant map service will include a
traffic layer and a traffic incidents layer.

Add the network dataset


Steps:
1.

Start ArcMap.

2.

If you don't already have a connection to the file geodatabase you received with the ArcGIS for Transportation Analytics
bundle, follow the substeps below.
a. Click the Catalog Window button on the Standard toolbar to open the Catalog window.
b.

In the Catalog window, right-click Folder Connections and choose Connect to Folder.
The Connect To Folder dialog box appears.

c.

Browse to or type the folder path of the location where the file geodatabase is stored.
The folder path should point to the same location as the one you specified in the Register Folder dialog box
while working through the steps in Configuring the street data. In those steps, the example path given was
D:\Services\SharedData.

d.

Click OK.
The Connect To Folder dialog box closes and a connection is added to the Folder Connections node in the
Catalog window.

3.

Browse to the Routing feature dataset, then add the Routing_ND network dataset to ArcMap.

4.

Add the network dataset to ArcMap by dragging it from the Catalog window and dropping it into ArcMap's map view or
table of contents.
The Adding Network Layer dialog box appears.

5.

Click No.
The network dataset begins to draw; however, this process may take a while and visualizing the network dataset isn't
necessary, so you will cancel the drawing.

6.

Press ESC to stop the drawing.

7.

Double-click the Routing_ND layer in the Table of Contents window.


The Layer Properties dialog box opens.

8.

Click the General tab.

9.

Type a descriptive name for the layer into the Layer Name text box. You may want to combine the region name with
Traffic (for example, NorthAmericaTraffic).

Copyright 1995-2013 Esri. All rights reserved.

44

ArcGIS for Transportation Analytics

10.

In the Scale Range frame, click Don't show layer when zoomed.

11.

Choose a suitable scale from the Out beyond drop-down list. This is the scale beyond which the traffic layer won't draw.
This value is useful to avoid drawing traffic at very small scales. In the example below, a value of 1:10,000,000 is used.

12.

Click OK.

Add the traffic incidents feature class


Steps:
1.

Click the Add Data button .


The Add Data dialog box opens.

2.

Browse to the database connection file that allows a user connection to the enterprise geodatabase you previously
created. Make sure you choose the connection file that connects as a database user, not as an administrator. You created
this file in the Create a database user section of the Create the enterprise geodatabase topic.
The contents of the enterprise geodatabase are shown in the Add Data dialog box.

3.

Add the traffic incidents feature class to ArcMap.

4.

Open the layer properties for the traffic incidents feature and follow the substeps below.
a. Click the General tab.
b.

Type a name for the layer in Layer Name, for example, NorthAmericaTrafficIncidents.

c.

In the Scale Range section, click Don't show layer when zoomed.

d.

Choose a suitable value from the Out beyond drop-down list. This is the scale beyond which the traffic incidents
layer will stop drawing. A common value to use is 1: 25,000,000.

e.

Click the Symbology tab.

f.

In the Show list box under Categories, click Unique Values.

g.

Select Severity or Incident Type in the Value Field drop-down list. Your choice for Value Field depends on
whether you want to see how severely an incident affects traffic or what type of incident it is (for example, a
stalled vehicle). The graphic below shows symbology based on Severity.

h.

Click Add All Values button.

i.

Pick an appropriate symbol for each value.

j.

Click OK.

Copyright 1995-2013 Esri. All rights reserved.

45

ArcGIS for Transportation Analytics

k.

Click the Time tab and check Enable time on this layer.

5.

On the main menu, click File > Map Document Properties.


The Map Document Properties dialog box opens.

6.

Fill out the Title, Summary, Description, Author, Credits, and Tags sections. This information will be visible in the
published map service.

7.

Save the map document. In this example, the document is saved to


F:\ArcGISForTAServices\Traffic\Traffic.mxd.

Publish the map


Steps:
1.

On the main menu, click File > Share As > Service.


The Share as Service wizard opens.

2.

Make sure that Publish a Service is chosen.

3.

Click Next.

4.

In the Choose a connection drop-down list, choose the publisher or administrator connection to your server.

5.

Type Traffic in the Service name text box.

6.

Click Next.

7.

Choose whether to publish the route service to an existing folder on your server, which includes the root level, or to a new
folder. Publishing to the root level is common.

8.

Click Continue.
The Service Editor dialog box appears.

9.

Click Capabilities in the left pane.

10.

Uncheck KML.

11.

Click Pooling, which is on the left pane of the dialog box, and specify the minimum and maximum number of instances per
machine. For optimal throughput, the recommended minimum and maximum values should be equal to number of cores
on the server machine.

12.

Click the Analyze button

13.

Examine the messages in the Prepare window and take appropriate action. Note that error messages require corrective
action, while warning and information messages do not, but fixing them may improve service performance. Right-click a
message for recommended and automated fixes and links to help documents.

14.

In the Service Editor dialog box, click Publish

, which is near the top of the Service Editor dialog box.

The traffic and traffic incident map service will be available momentarily on your server.
15.

Close the map document without saving any changes.

Copyright 1995-2013 Esri. All rights reserved.

46

ArcGIS for Transportation Analytics

Test your traffic service


This section is optional but useful if you want to confirm your service works.
Steps:
1.

From the menu bar, click File > New.


The New Document dialog box appears.

2.

Double-click Blank Map.

3.

On the Standard toolbar, click the drop-down arrow next to the Add Data button
The Add Basemap dialog box appears.

4.

Double-click a basemap that works well for referencing the road network in your region, such as Streets, National
Geographic, Topographic, or OpenStreetMap.

5.

Zoom into the region the data in your file geodatabase covers. Zoom to a scale of 1:500,000.

6.

In the Catalog window, browse to GIS Servers.

7.

Connect to your server if a connection isn't already present.

8.

Navigate to the traffic map service and add it to ArcMap.


By default, the traffic for the current time is shown. If you want to see traffic for a different time, use the time slider, which is
accessed by clicking the Time Slider button on the Tools toolbar.

Copyright 1995-2013 Esri. All rights reserved.

and choose Basemap.

47

S-ar putea să vă placă și