org.osm2world.core.map_data.data
Class MapWaySegment

Object
  extended by MapSegment
      extended by MapWaySegment
All Implemented Interfaces:
MapElement, IntersectionTestObject

public class MapWaySegment
extends MapSegment
implements MapElement

line between two nodes in the map data


Field Summary
 
Fields inherited from class MapSegment
endNode, startNode
 
Constructor Summary
MapWaySegment(OSMWay osmWay, MapNode startNode, MapNode endNode)
           
 
Method Summary
 void addOverlap(MapOverlap<?,?> overlap)
           
 void addRepresentation(WaySegmentWorldObject representation)
          adds a visual representation for this way segment
 AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
           
 WaySegmentElevationProfile getElevationProfile()
          returns the elevation information for this GridElement.
 Iterable<MapIntersectionWW> getIntersectionsWW()
           
 int getLayer()
           
 OSMWay getOsmWay()
           
 Collection<MapOverlap<?,?>> getOverlaps()
          returns all overlaps between this MapElement and other MapElements.
 WaySegmentWorldObject getPrimaryRepresentation()
          returns the primary representation, or null if the object doesn't have any.
 List<WaySegmentWorldObject> getRepresentations()
          returns the visual representations of this element.
 TagGroup getTags()
          returns the tags of the underlying OSMElement
 void setElevationProfile(WaySegmentElevationProfile elevationProfile)
           
 String toString()
           
 
Methods inherited from class MapSegment
getCenter, getDirection, getEndNode, getLineSegment, getOtherNode, getRightNormal, getStartEndNodes, getStartNode, isConnectedTo, isConnectedTo, sharesBothNodes
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapWaySegment

public MapWaySegment(OSMWay osmWay,
                     MapNode startNode,
                     MapNode endNode)
Method Detail

getLayer

public int getLayer()
Specified by:
getLayer in interface MapElement

getOsmWay

public OSMWay getOsmWay()

getTags

public TagGroup getTags()
Description copied from interface: MapElement
returns the tags of the underlying OSMElement

Specified by:
getTags in interface MapElement

addOverlap

public void addOverlap(MapOverlap<?,?> overlap)

getOverlaps

public Collection<MapOverlap<?,?>> getOverlaps()
Description copied from interface: MapElement
returns all overlaps between this MapElement and other MapElements.

Specified by:
getOverlaps in interface MapElement

getIntersectionsWW

public Iterable<MapIntersectionWW> getIntersectionsWW()

getAxisAlignedBoundingBoxXZ

public AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
Specified by:
getAxisAlignedBoundingBoxXZ in interface IntersectionTestObject

getRepresentations

public List<WaySegmentWorldObject> getRepresentations()
Description copied from interface: MapElement
returns the visual representations of this element. The order should match the order in which they were added, so that dependencies are preserved (elements that depend on another element should be placed after that element). The first element is considered the "primary" representation, and for some purposes - such as elevation calculation -, only this representation will be used.

Specified by:
getRepresentations in interface MapElement

getPrimaryRepresentation

public WaySegmentWorldObject getPrimaryRepresentation()
Description copied from interface: MapElement
returns the primary representation, or null if the object doesn't have any.

Specified by:
getPrimaryRepresentation in interface MapElement
See Also:
MapElement.getRepresentations()

addRepresentation

public void addRepresentation(WaySegmentWorldObject representation)
adds a visual representation for this way segment


getElevationProfile

public WaySegmentElevationProfile getElevationProfile()
Description copied from interface: MapElement
returns the elevation information for this GridElement. Can be null if no elevations have been set yet or if the element was ignored during elevation calculation because it didn't have a representation.

Specified by:
getElevationProfile in interface MapElement

setElevationProfile

public void setElevationProfile(WaySegmentElevationProfile elevationProfile)

toString

public String toString()
Overrides:
toString in class Object