arcgis runtime sdks: building a routing applicationarcgis runtime sdk v100.x license model standard...

44
ArcGIS Runtime SDKs: Building a Routing Application Frank Kish Konstantin Kutsner

Upload: others

Post on 12-Sep-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

ArcGIS Runtime SDKs:

Building a Routing ApplicationFrank Kish

Konstantin Kutsner

Page 2: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Overview

• What goes into a routing application

• Data connected \ disconnected

• Demo creating mmpk

• API

• Demo code

• Other Resources & Road Ahead

Page 3: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Slides, code, and data

Slides at:

http://proceedings.esri.com

Shared Box folder

https://goo.gl/r1vITx

This slide is repeated at the end this presentation

Page 4: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

What makes up a routing application?

• Map

- visualization

- service\mobile map package

• Search

- given address get the x,y

- given a x,y get the address

- LocatorTask

• Routing

- find path from A to B to C

- find best path A, B and C

- RouteTask

Page 5: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

ArcGIS Runtime SDK v100.x License Model

Standard

• License Key

• All capabilities of Basic

• Access to additional data

• Raster layers

• Raster elevation sources

• Local Server

• Map services

• Feature services

• Edit file geodatabases

• GP services

• Subset of ArcGIS Desktop

basic tools

Advanced

• License Key

• All capabilities of Standard

• Local Server

• Feature services

• Edit enterprise geodatabases

• GP services

• Subset of ArcGIS Desktop

standard and advanced

tools

Basic

• Named User – Level 2

• License Key

• All capabilities of Lite

• Simple feature editing

• Add, update, delete content on

portals

• Use of ArcGIS Online analysis

services

Lite

• Named User – Level 1

• License Key

• View maps, scenes, layers, packages

from the ArcGIS Platform

• Routing

• Place finding

Analysis Extension

• License Key

• Local Server GP tools

• Analysis

• 3D Analyst

• Spatial Analyst

• Network Analyst

Page 6: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Data - Users always\mostly connected?

• ArcGIS.com

- Mapping services

- World geocoding service

- World routing service

• Server\Portal

- Your own … mapping services

… geocoding services

… routing services

Page 7: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Data - Users always\frequently disconnected?

• Data on the device

• Mobile Map Package (.mmpk)

• ArcGIS Pro’s ‘Create Mobile Map Package’

• Single file that can include:

- Map(s), Locator(s), Network dataset(s)

Page 8: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Hybrid

• Scenario 1

- Maps on device in mmpk

- ArcGIS.com for search and routing

• Scenario 2

- ArcGIS.com for maps

- Your own search and route services

Page 9: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Connected vs. Disconnected

• Very little difference programmatically

• Initially create the map or task

- e.g. Route Task

• Resources and workflows

Page 10: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Local data

Page 11: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Create Address Locator

• Example

- Single Field Style

- Source Data

- Search Field

- Enable suggestions

• Locator files on disk

• Include in package

Page 12: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Demo – MMPK

Page 13: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Mobile Map Package

• Operational and Basemap data from different geodatabases

• For routing purposes use a (slightly) larger area

- to help maintain network connectivity near edges

• All the data is projected to the map’s spatial reference

Page 14: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

ArcGIS Runtime API\SDK

Page 15: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

SDK’s

- Android

- iOS \ macOS

- Java

- .NET

- Qt

ArcGIS

Page 16: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Examples of Loading a Map

from MMPK

Page 17: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Loading a Map from MMPK

• .Net - C#

string mmpkPath = @"C:\Data\DS2017Demo.mmpk";

// load the mobile map packageMobileMapPackage mmpk = await MobileMapPackage.OpenAsync(mmpkPath);

// set the mapview's map to the first map in the packageMyMapView.Map = mmpk.Maps[0];

Page 18: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Loading a Map from MMPK

• Android - Java

Page 19: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Loading a Map from MMPK

• iOS - Swift

Page 20: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Routing - Introduction

Page 21: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Basic steps for Routing

• Instantiate route task

• Create routing parameters and set properties

• Solve to find route

Page 22: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

RouteTask & RouteParameters

• Route Task

- Network dataset in mmpk

- Uri to service

• Route Parameters

- Holds input parameters for a solve operation

- SetStops, StartTime, FindBestSequence, PreserveFirst

Page 23: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Basic steps for Routing – C#

// #1 create route task from the first map's first networkRouteTask routeTask = await RouteTask.CreateAsync(MyMapView.Map.TransportationNetworks[0]);

// #2 get the default parametersRouteParameters routeParameters = await routeTask.CreateDefaultParametersAsync(); routeParameters.SetStops(stopsList);

// #3 solvevar routeResult = await routeTask.SolveRouteAsync(routeParameters);

Page 24: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Basic steps for Routing – Java

Page 25: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Demo – Using a MMPK and

RouteTask

Page 26: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Routing - Details

Page 27: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Travel Modes

• Collection of settings that define how a ‘vehicle’ is

allowed to move through the network

- Impedance (e.g. TravelTime)

- Restrictions (e.g. Oneway)

• Defined in a network dataset

• The collection of properties work together

Page 28: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Routing service

• Publishing route analysis layer

- sits on top of network dataset

- has more properties that can be set than on

network dataset

- start time

- reorder stops to find optimal route

Page 29: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

ArcGIS Runtime Routing classes

• RouteTask

• RouteParameters

• RouteTaskInfo

• TravelMode

• Stops

• RouteResults

• Route

• DirectionManeuvers

Page 30: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

RouteTaskInfo

• Properties of underlying dataset \ service

• Read only

• Used to:

- create a UI default or options

- correctly set route parameter values

- valid travel mode or cost attributes

Page 31: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Stop

• Takes a MapPoint

- Can be in different spatial ref from network … solve operation will project

• Properties:

- add costs, set time windows

• Stops from a table

- Online or local geodatabase

- Field values are mapped to individual stop properties

- based on field naming convention

- http://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/route.htm

Page 32: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Solve & RouteResult

• RouteTask.SolveRouteAysnc(RouteParameters)

• Returns a RouteResult

- Messages – high level information about the solve

- “One or more stops is located on a soft-restricted element”

- Routes

Page 33: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Routes

• Total Distance, Travel Time, Total Time, etc

• Stops

- Located stops

- Copy of the inputs stops

- Snapped to network different X,Y

- Other properties populate (e.g. Location Status)

• Direction Maneuvers

Page 34: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Direction Maneuvers

• DirectionText

- ‘Go northeast on Stevenson St toward 5th St’

• Geometry

• ManeuverType

• ManeuverMessages

- More detailed breakdown of the directions

• DirectionEvents

- Crossing a state or time zone boundary

Page 35: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Related Resources

Page 36: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Example Apps

• Open source applications built with the Runtime SDK

• Easy starting point for developing your own app

• Maps App – Android

- https://developers.arcgis.com/android/latest/guide/start-with-the-maps-app.htm

• Nearby Places – Android

- https://developers.arcgis.com/android/latest/guide/nearby.htm

• Indoor Routing - Xamarin

- https://github.com/Esri/indoor-routing-xamarin/tree/master/IndoorRouting

Page 37: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

StreetMap Premium Custom Roads

• File Geodatabase, ArcGIS Pro project

- Add custom roads for routing

- Update network properties

• http://www.esri.com/data/streetmap

• Tutorial

- http://doc.arcgis.com/en/navigator/prepare-maps/add-assets-and-digitize-roads.htm

Page 38: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Navigator for ArcGIS

• App for iOS\Android

• Navigator custom URL scheme

- arcgis-navigator://?stop=43.65958,-70.25118

- https://github.com/Esri/navigator-integration

Page 39: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Road Ahead

Page 40: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Road Ahead

• Closest Facilities Task

• Service Area Task

- online in update 1

- local data in update 2

Page 41: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Road Ahead

• StreetMap Premium for Runtime

- MMPK’s

- Display, route and geocode

- network dataset and locators

- 5 regions

- North America

- Latin America

- Europe

- Middle East & Africa

- Asia Pacific

Page 42: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Please Take Our Survey!

Download the Esri Events app

and find your event

Select the session you

attended

Scroll down to the

“Feedback” section

Complete Answers,

add a Comment,

and Select “Submit”

Page 43: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •
Page 44: ArcGIS Runtime SDKs: Building a Routing ApplicationArcGIS Runtime SDK v100.x License Model Standard • License Key • All capabilities of Basic • Access to additional data •

Slides, code, and data

Slides at:

http://proceedings.esri.com

Shared Box folder

https://goo.gl/r1vITx