GreatCircleBasedSpatialModel

A great circle spatial model represents the distance between two coordinates on the earth based on latitude and longitude. It provides an approximate distance of travelling along the great circle between the coordinates. The model implemented within the KSL allows for the adjustment of the distance based on circuity factor. The circuity factor will adjust the distance based on the mode of transport road or rail.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
inner class GPSCoordinate(val latitude: Double, val longitude: Double, aName: String? = null) : SpatialModel.AbstractLocation

Represents a location within this spatial model.

Properties

Link copied to clipboard

Can be set to adjust computed great circle distance to account for the circuity of the road/rail network, by default 1.0

Link copied to clipboard
open override var defaultLocation: LocationIfc

The default initial location.

Link copied to clipboard

Holds the radius of the earth for calculating great circle distance

Functions

Link copied to clipboard
open override fun compareLocations(firstLocation: LocationIfc, secondLocation: LocationIfc): Boolean

Returns true if firstLocation is the same as secondLocation within the underlying spatial model. This is not object reference equality, but rather whether the locations within the underlying spatial model can be considered spatially (equivalent) according to the model. This may or may not imply that the distance between the locations is zero. No assumptions about distance are implied by true.

Link copied to clipboard
open override fun distance(fromLocation: LocationIfc, toLocation: LocationIfc): Double

Computes the distance between fromLocation and toLocation based on the spatial model's distance metric