OSMEnvironment

This class serves as 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 rely 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 positions comparison.
Link copied to clipboard
The default value for the discard of nodes too far from streets option.
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
val nodes: ListSet<Node<T>>
Link copied to clipboard
open var simulation: Simulation<T, P>

Functions

Link copied to clipboard
Link copied to clipboard
fun addLayer(p: Molecule, p1: Layer<T, P>)
Link copied to clipboard
fun addNode(p: Node<T>, p1: P): Boolean
Link copied to clipboard
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 enableBenchmark()
Link copied to clipboard
fun forEach(p: Consumer<in Node<T>>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getLayers(): ListSet<Layer<T, P>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getNodeByID(p: Int): Node<T>
Link copied to clipboard
Link copied to clipboard
fun getNodesWithinRange(p: Node<T>, p1: Double): ListSet<Node<T>>
Link copied to clipboard
Link copied to clipboard
fun getPosition(p: Node<T>): P
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
open fun makePosition(coordinates: Array<Number>): GeoPosition
Link copied to clipboard
open fun moveNodeToPosition(p: Node<T>, p1: P)
Link copied to clipboard
Link copied to clipboard
fun removeNode(p: Node<T>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun toString(): String