de.cm.osm2po.routing
Class Section

java.lang.Object
  extended by de.cm.osm2po.routing.Section

public class Section
extends java.lang.Object

Eine Edge nach kuenstlicher Aufsplittung durch einen TouchPoint. (engl. Section = Abschnitt) Funktioniert aber ebenfalls fuer reine Vertices und beschreibt hier die komplette Edge mit einer Ratio von 1.0 == nicht geteilt.

Author:
(c) 2012 - Carsten Moeller - info@osm2po.de

Constructor Summary
Section(int edgeIdx, double ratio, de.cm.osm2po.model.LatLons geometry)
           
Section(int vIdx, int edgeIdx, int sourceId, int targetId, double ratio, de.cm.osm2po.model.LatLons geometry)
           
 
Method Summary
static double calcPathLength(Graph graph, Section[] sections)
          Berechnet die Strecke einer Route.
static double calcPathTime(Graph graph, Section[] sections)
          Berechnet die Fahrzeit einer Route.
 int getEdgeIdx()
           
 de.cm.osm2po.model.LatLons getGeometry()
           
 int getIdx()
           
 double getRatio()
           
 int getSourceId()
           
 int getTargetId()
           
static Section[] makePath(Graph graph, int[] edgeIdxs)
          Wandelt eine Liste von EdgeIdx aus dem statischen Original Graphen Graph in eine Liste von Section mit Ratio 1 und Geometry null.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Section

public Section(int edgeIdx,
               double ratio,
               de.cm.osm2po.model.LatLons geometry)

Section

public Section(int vIdx,
               int edgeIdx,
               int sourceId,
               int targetId,
               double ratio,
               de.cm.osm2po.model.LatLons geometry)
Method Detail

getIdx

public int getIdx()

getEdgeIdx

public int getEdgeIdx()

getSourceId

public int getSourceId()

getTargetId

public int getTargetId()

getRatio

public double getRatio()

getGeometry

public de.cm.osm2po.model.LatLons getGeometry()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

makePath

public static Section[] makePath(Graph graph,
                                 int[] edgeIdxs)
Wandelt eine Liste von EdgeIdx aus dem statischen Original Graphen Graph in eine Liste von Section mit Ratio 1 und Geometry null.

Parameters:
graph - OverlayGraph static graph.
edgeIdxs - int[] Array von Referenzen auf Edges.
Returns:
Section[] Array oder null, wenn null uebergeben.

calcPathLength

public static double calcPathLength(Graph graph,
                                    Section[] sections)
Berechnet die Strecke einer Route.

Parameters:
graph - Graph
sections - (Route) Array of Section
Returns:
double Strecke

calcPathTime

public static double calcPathTime(Graph graph,
                                  Section[] sections)
Berechnet die Fahrzeit einer Route.

Parameters:
graph - Graph
sections - (Route) Array of Section
Returns:
double Fahrzeit

osm2po-core-4.8.8 (c) 2012 Carsten Moeller - info@osm2po.de