com.mizar.addressing.routing
Class RoutingStep

java.lang.Object
  extended by com.mizar.addressing.routing.RoutingStep

public class RoutingStep
extends java.lang.Object

The route from start stop to end stop.


Constructor Summary
RoutingStep()
           
RoutingStep(RoutingStop start, RoutingStop end, double[] ords)
          Constructs a step from start stop to end stop using ordinates array
RoutingStep(RoutingStop start, RoutingStop end, oracle.spatial.network.Path path)
          Constructs a step from start stop to end stop using path
 
Method Summary
 double[] appendEndGeom(double[] ords, Polyline poly)
          TODO Figure out what this does.
 void buildStep(oracle.spatial.network.Link[] links, java.lang.String name, int startIdx, int endIdx)
          Builds a street step from the specified path components
 RoutingStop getEnd()
           
 java.lang.String[] getRoute()
          Returns the step as an array of Strings, each string a driving instruction
 RoutingStop getStart()
           
 java.util.ArrayList<RoutingStreetStep> getSteps()
           
 java.util.ArrayList<RoutingStreetStep> getStreetSteps(oracle.spatial.network.Path path)
          Walk the path and break it into chucks with the same street name.
 double[] getSubpathGeom(oracle.spatial.network.Link[] links, int startIdx, int endIdx)
          Constructs a geometry from the specified path components
 double[] prependStartGeom(double[] ords, Polyline poly)
          TODO Figure out what this does.
 void printRoute()
          Prints driving directions to System.out
 void setEnd(RoutingStop end)
           
 void setStart(RoutingStop start)
           
 void setSteps(java.util.ArrayList<RoutingStreetStep> steps)
           
 java.lang.String toString()
          Returns a string representation of the Step
 Polyline trimEndGeom(double[] ords, double[] sNode)
          TODO Figure out what this does.
 Polyline trimStartGeom(double[] ords, double[] sNode)
          TODO Figure out what this does.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoutingStep

public RoutingStep()

RoutingStep

public RoutingStep(RoutingStop start,
                   RoutingStop end,
                   oracle.spatial.network.Path path)
            throws GeometryException
Constructs a step from start stop to end stop using path

Parameters:
start - Start stop
end - End stop
path - Path fromn start to end
Throws:
GeometryException

RoutingStep

public RoutingStep(RoutingStop start,
                   RoutingStop end,
                   double[] ords)
Constructs a step from start stop to end stop using ordinates array

Parameters:
start - Start stop
end - End stop
ords - Ordinate array
Method Detail

getStreetSteps

public java.util.ArrayList<RoutingStreetStep> getStreetSteps(oracle.spatial.network.Path path)
                                                      throws GeometryException
Walk the path and break it into chucks with the same street name.

Parameters:
path - The path to process
Returns:
Throws:
GeometryException

buildStep

public void buildStep(oracle.spatial.network.Link[] links,
                      java.lang.String name,
                      int startIdx,
                      int endIdx)
               throws GeometryException
Builds a street step from the specified path components

Parameters:
links - Path being processed
name - Street anem
startIdx - start index of link array
endIdx - end index of link array
Throws:
GeometryException

prependStartGeom

public double[] prependStartGeom(double[] ords,
                                 Polyline poly)
TODO Figure out what this does.

Parameters:
ords - Ordinate array
poly - Polyline
Returns:
new ordinate array

appendEndGeom

public double[] appendEndGeom(double[] ords,
                              Polyline poly)
TODO Figure out what this does.

Parameters:
ords - Ordinate array
poly - Polyline
Returns:
new ordinate array

trimStartGeom

public Polyline trimStartGeom(double[] ords,
                              double[] sNode)
                       throws GeometryException
TODO Figure out what this does.

Parameters:
ords - Ordinate array
sNode - Node array
Returns:
new Polyline object
Throws:
GeometryException

trimEndGeom

public Polyline trimEndGeom(double[] ords,
                            double[] sNode)
                     throws GeometryException
TODO Figure out what this does.

Parameters:
ords - Ordinate array
sNode - Node array
Returns:
new Polyline object
Throws:
GeometryException

getSubpathGeom

public double[] getSubpathGeom(oracle.spatial.network.Link[] links,
                               int startIdx,
                               int endIdx)
Constructs a geometry from the specified path components

Parameters:
path - Path to process
startIdx - Start index of link array
endIdx - End index of Link array
Returns:
The geometry

setStart

public void setStart(RoutingStop start)
Parameters:
start -

getStart

public RoutingStop getStart()
Returns:

setEnd

public void setEnd(RoutingStop end)
Parameters:
end -

getEnd

public RoutingStop getEnd()
Returns:

setSteps

public void setSteps(java.util.ArrayList<RoutingStreetStep> steps)
Parameters:
steps -

getSteps

public java.util.ArrayList<RoutingStreetStep> getSteps()
Returns:

printRoute

public void printRoute()
Prints driving directions to System.out


toString

public java.lang.String toString()
Returns a string representation of the Step

Overrides:
toString in class java.lang.Object
Returns:

getRoute

public java.lang.String[] getRoute()
Returns the step as an array of Strings, each string a driving instruction

Returns: