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

Functions

Link copied to clipboard
fun addLayer(m: Molecule, l: Layer<T, P>)
Link copied to clipboard
fun addNode(node: Node<T>, p: P)
Link copied to clipboard
fun addTerminator(terminator: Predicate<Environment<T, P>>)
Link copied to clipboard
open fun computeRoute(p1: GeoPosition, p2: GeoPosition): Route<GeoPosition>
open fun computeRoute(node: Node<T>, coord: GeoPosition): Route<GeoPosition>
open fun computeRoute(node: Node<T>, node2: Node<T>): Route<GeoPosition>
open fun computeRoute(from: GeoPosition, to: GeoPosition, options: GraphHopperOptions): 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(action: Consumer<out Any>)
Link copied to clipboard
open fun getBenchmarkResult(): Double
Link copied to clipboard
fun getDimensions(): Int
Link copied to clipboard
fun getDistanceBetweenNodes(n1: Node<T>, n2: Node<T>): Double
Link copied to clipboard
fun getIncarnation(): Optional<Incarnation<T, P>>
Link copied to clipboard
fun getLayer(m: Molecule): Optional<Layer<T, P>>
Link copied to clipboard
fun getLayers(): ListSet<Layer<T, P>>
Link copied to clipboard
fun getLinkingRule(): LinkingRule<T, P>
Link copied to clipboard
fun getNeighborhood(center: Node<T>): Neighborhood<T>
Link copied to clipboard
fun getNodeByID(id: Int): Node<T>
Link copied to clipboard
fun getNodeCount(): Int
Link copied to clipboard
fun getNodes(): ListSet<Node<T>>
Link copied to clipboard
fun getNodesWithinRange(center: Node<T>, range: Double): ListSet<Node<T>>
Link copied to clipboard
fun getOffset(): Array<Double>
Link copied to clipboard
fun getPosition(node: Node<T>): P
Link copied to clipboard
open fun getRoutingService(): GraphHopperRoutingService
Link copied to clipboard
fun getSimulation(): Simulation<T, P>
Link copied to clipboard
fun getSize(): Array<Double>
Link copied to clipboard
open fun getSizeInDistanceUnits(): Array<Double>
Link copied to clipboard
fun isTerminated(): Boolean
Link copied to clipboard
fun iterator(): Iterator<Node<T>>
abstract fun iterator(): Iterator<T>
Link copied to clipboard
open fun makePosition(coordinates: Array<Number>): GeoPosition
Link copied to clipboard
open fun moveNodeToPosition(node: Node<T>, newpos: P)
Link copied to clipboard
fun removeNode(node: Node<T>)
Link copied to clipboard
fun setLinkingRule(r: LinkingRule<T, P>)
Link copied to clipboard
fun setSimulation(s: Simulation<T, P>)
Link copied to clipboard
fun spliterator(): Spliterator<Node<T>>
open fun spliterator(): Spliterator<T>
Link copied to clipboard
open fun toString(): String

Properties

Link copied to clipboard
val DEFAULT_APPROXIMATION: Int
The default value for approximating the positions comparison.
Link copied to clipboard
val DEFAULT_FORCE_STREETS: Boolean
The default value for the discard of nodes too far from streets option.
Link copied to clipboard
val DEFAULT_ON_STREETS: Boolean
The default value for the force nodes on streets option.