Incident

class Incident

A class that represents an incident. Incidents also represent locations that can serve as the starting point or ending point of a closest facility analysis, for example, a fire or a traffic accident. The Incident class contains one of location inputs for the ClosestFacilityTask. The ClosestFacilityTask will create a route between facilities and incidents.

Since

200.1.0

Constructors

Link copied to clipboard
constructor(point: Point)

Creates an incident instance with point. Creates an incident.

Properties

Link copied to clipboard

Curb approach. Default value CurbApproach.EitherSide will be returned on error.

Link copied to clipboard

Current bearing in degrees. Current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN, negative values will be subtracted from 360 (e.g. -15 => 345), values greater than 360 will be have 360 subtracted from them (e.g. 385 => 25). For this property to be used the bearing tolerance also has to be set.

Link copied to clipboard

Current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.

Link copied to clipboard

Distance to network location in meters. The distance to network location in meters that can be populated by closest facility task.

Link copied to clipboard

Incident's point geometry. Incident's location using geographical point.

Link copied to clipboard

Impedance cutoff. It's a value for the impedance beyond which facilities should not be found.

Link copied to clipboard

Incident ID. This is a caller supplied foreign key that can be used to associate output incidents with input incidents.

Link copied to clipboard

Location status. Incident location's status that can be populated by closest facility task. Default value LocationStatus.NotLocated will be returned on error.

Link copied to clipboard

Incident's name. Incident's name to be reported in driving directions.

Link copied to clipboard

Navigation latency in seconds.

Link copied to clipboard

Navigation speed in meters per second.

Link copied to clipboard

Network location. The incident's location on the network that can be populated by closest facility task. Set to null for resetting a network location.

Link copied to clipboard

Target facility count. The -1 value means target facility count property is not considered, but default is used instead. Default value can be obtained from ClosestFacilityTaskInfo.defaultTargetFacilityCount method.

Functions

Link copied to clipboard

Clones the Incident.

Link copied to clipboard
fun getAddedCost(attributeName: String): Double

Gets added cost attribute value. Returns added cost value for given impedance or accumulate attribute.

Link copied to clipboard
fun setAddedCost(attributeName: String, addedCost: Double)

Sets added cost. Sets added cost value for given impedance or accumulate attribute.