OSMEnvironment

This class serves as a template for more specific implementations of environments using a map. It encloses the navigation logic but leaves the subclasses to decide how to provide map data (e.g., loading from disk or relying on online services). The data is then stored in-memory for performance reasons.

Parameters

<T>

concentration type

Constructors

Link copied to clipboard
constructor(incarnation: Incarnation<T, GeoPosition>)
Builds a new OSMEnvironment without an actual backing map.
constructor(incarnation: Incarnation<T, GeoPosition>, file: String)
Builds a new OSMEnvironment, with nodes not forced on streets.
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, onStreets: Boolean)
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, onStreets: Boolean, onlyOnStreets: Boolean)
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, approximation: Int)
constructor(incarnation: Incarnation<T, GeoPosition>, file: String, approximation: Int, onStreets: Boolean, onlyOnStreets: Boolean)

Properties

Link copied to clipboard
The default value for approximating the position comparison.
Link copied to clipboard
The default value for the discard of nodes too far from streets.
Link copied to clipboard
The default value for the force nodes on streets option.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun addLayer(molecule: Molecule, layer: Layer<T, P>)
Link copied to clipboard
open fun addNode(node: Node<T>, position: P): Boolean
Link copied to clipboard
open fun addReaction(reaction: Reaction<T>)
Link copied to clipboard
open fun addTerminator(terminator: TerminationPredicate<T, P>)
Link copied to clipboard
open fun computeRoute(node: Node<T>, coord: GeoPosition): Route<GeoPosition>
open fun computeRoute(node: Node<T>, node2: Node<T>): Route<GeoPosition>
open fun computeRoute(node: Node<T>, coord: GeoPosition, options: GraphHopperOptions): Route<GeoPosition>
This method relies on the map data and computes a route towards some absolute coordinate solving a TSP problem.
Link copied to clipboard
open fun contains(node: Node<T>): Boolean
Link copied to clipboard
open fun currentPositionOf(node: Node<T>): P
Link copied to clipboard
open fun distanceBetween(n1: Node<T>, n2: Node<T>): Double
Link copied to clipboard
open fun distanceTo($this$distanceTo: Node<T>, other: Node<T>): Double
Link copied to clipboard
open fun farthestReachablePosition(node: Node<T>, desired: P): P
Link copied to clipboard
open fun getCurrentPosition($this$currentPosition: Node<T>): P
Link copied to clipboard
Link copied to clipboard
open fun getNeighborhood($this$neighborhood: Node<T>): Observable<Neighborhood<T>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getPosition($this$position: Node<T>): Observable<P>
Link copied to clipboard
Link copied to clipboard
Returns the routing service of this environment.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isTerminated(): Boolean
Link copied to clipboard
open fun layerFor(molecule: Molecule): Layer<T, P>
Link copied to clipboard
open fun makePosition(coordinates: List<out Number>): P
@NotNull
open fun makePosition(@NotNull coordinates: Array<Double>): GeoPosition
open fun makePosition(coordinates: Array<Number>): GeoPosition
Link copied to clipboard
open fun moveNodeTo(node: Node<T>, position: P)
Link copied to clipboard
open fun moveTo($this$moveTo: Node<T>, position: P)
Link copied to clipboard
Link copied to clipboard
open fun nodesAround(node: Node<T>, range: Double): List<Node<T>>
Link copied to clipboard
open fun nodesInRange($this$nodesInRange: Node<T>, range: Double): List<Node<T>>
Link copied to clipboard
open fun nodeWithId(id: Int): Node<T>
Link copied to clipboard
open fun observeLayerValue(molecule: Molecule, node: Node<T>): Observable<T>
Link copied to clipboard
open fun observeNodesAround(node: Node<T>, range: Double): ObservableSet<Node<T>>
Link copied to clipboard
open fun observeNodesInRange($this$observeNodesInRange: Node<T>, range: Double): ObservableSet<Node<T>>
Link copied to clipboard
open fun positionOf(node: Node<T>): Observable<P>
Link copied to clipboard
open fun remove($this$remove: Node<T>)
Link copied to clipboard
open fun removeNode(node: Node<T>)
Link copied to clipboard
open fun removeReaction(reaction: Reaction<T>)
Link copied to clipboard
fun setSimulation(value: Simulation<T, P>)
Link copied to clipboard
open fun toPosition($this$toPosition: Array<Double>): P
Link copied to clipboard
open fun toString(): String