openlr.map.sqlite.impl
Class LineImpl

java.lang.Object
  extended by openlr.map.sqlite.impl.LineImpl
All Implemented Interfaces:
openlr.map.Line

public final class LineImpl
extends Object
implements openlr.map.Line

Implementation of the OpenLR Line interface for use with a TomTom digital map in SQLite format.

OpenLR is a trade mark of TomTom International B.V.

email: software@openlr.org

Author:
TomTom International B.V.

Constructor Summary
LineImpl(openlr.map.MapDatabase mapDB, long idValue, long startNode, long endNode, openlr.map.FormOfWay fow, openlr.map.FunctionalRoadClass frc, com.vividsolutions.jts.geom.LineString lineS, int lengthValue, Map<Locale,List<String>> roadNames)
          Creates an instance of this class representing a Line feature with a given ID in the network managed by the given
 
Method Summary
 int distanceToPoint(double longitude, double latitude)
          
 boolean equals(Object other)
          
 openlr.map.Node getEndNode()
          
 openlr.map.FormOfWay getFOW()
          
 openlr.map.FunctionalRoadClass getFRC()
          
 long getID()
          
 int getLineLength()
          
 Map<Locale,List<String>> getNames()
          
 Iterator<? extends openlr.map.Line> getNextLines()
          
 Point2D.Double getPointAlongLine(int distance)
          
 Iterator<? extends openlr.map.Line> getPrevLines()
          
 Path2D.Double getShape()
          
 openlr.map.Node getStartNode()
          
 int hashCode()
          
 int measureAlongLine(double longitude, double latitude)
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineImpl

public LineImpl(openlr.map.MapDatabase mapDB,
                long idValue,
                long startNode,
                long endNode,
                openlr.map.FormOfWay fow,
                openlr.map.FunctionalRoadClass frc,
                com.vividsolutions.jts.geom.LineString lineS,
                int lengthValue,
                Map<Locale,List<String>> roadNames)
Creates an instance of this class representing a Line feature with a given ID in the network managed by the given

Parameters:
mapDB - the MapDatabase this feature is managed by.
idValue - the unique ID of this Line.
startNode - the start node id
endNode - the end node id
fow - the FormOfWay attribute value.
frc - the FunctionalRoadClass attribute value.
lineS - the geometry object which represents this object spatially.
lengthValue - the length of this line in meters.
roadNames - the naming information for the road which is represented by this Line. MapDatabase instance.
Method Detail

distanceToPoint

public int distanceToPoint(double longitude,
                           double latitude)

Specified by:
distanceToPoint in interface openlr.map.Line

equals

public boolean equals(Object other)

Specified by:
equals in interface openlr.map.Line
Overrides:
equals in class Object

getEndNode

public openlr.map.Node getEndNode()

Specified by:
getEndNode in interface openlr.map.Line

getFOW

public openlr.map.FormOfWay getFOW()

Specified by:
getFOW in interface openlr.map.Line

getFRC

public openlr.map.FunctionalRoadClass getFRC()

Specified by:
getFRC in interface openlr.map.Line

getID

public long getID()

Specified by:
getID in interface openlr.map.Line

getLineLength

public int getLineLength()

Specified by:
getLineLength in interface openlr.map.Line

getNames

public Map<Locale,List<String>> getNames()

Specified by:
getNames in interface openlr.map.Line

getNextLines

public Iterator<? extends openlr.map.Line> getNextLines()

Specified by:
getNextLines in interface openlr.map.Line

getPointAlongLine

public Point2D.Double getPointAlongLine(int distance)

Specified by:
getPointAlongLine in interface openlr.map.Line

getPrevLines

public Iterator<? extends openlr.map.Line> getPrevLines()

Specified by:
getPrevLines in interface openlr.map.Line

getShape

public Path2D.Double getShape()

Specified by:
getShape in interface openlr.map.Line

getStartNode

public openlr.map.Node getStartNode()

Specified by:
getStartNode in interface openlr.map.Line

hashCode

public int hashCode()

Specified by:
hashCode in interface openlr.map.Line
Overrides:
hashCode in class Object

measureAlongLine

public int measureAlongLine(double longitude,
                            double latitude)

Specified by:
measureAlongLine in interface openlr.map.Line

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012 TomTom International B.V.. All Rights Reserved.