org.osm2world.core.map_elevation.creation
Class TagElevationCalculator

Object
  extended by TagElevationCalculator
All Implemented Interfaces:
ElevationCalculator
Direct Known Subclasses:
BridgeTunnelElevationCalculator, EleTagElevationCalculator, LevelTagElevationCalculator

public abstract class TagElevationCalculator
extends Object
implements ElevationCalculator

relies on tags that explicitly set elevation. Subclasses determine the tag(s) to be used for this purpose.


Constructor Summary
TagElevationCalculator()
           
TagElevationCalculator(Double terrainElevation, boolean enableUnknownEleWarning)
           
 
Method Summary
 void calculateElevations(MapData mapData, CellularTerrainElevation eleData)
          provides elevation information for all elements in the MapData.
protected abstract  Double getEleForTags(TagGroup tags)
          returns the elevation as set explicitly by the tags
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagElevationCalculator

public TagElevationCalculator(Double terrainElevation,
                              boolean enableUnknownEleWarning)
Parameters:
terrainElevation - elevation for the terrain

TagElevationCalculator

public TagElevationCalculator()
Method Detail

calculateElevations

public void calculateElevations(MapData mapData,
                                CellularTerrainElevation eleData)
Description copied from interface: ElevationCalculator
provides elevation information for all elements in the MapData. Implementations of this method need to

Specified by:
calculateElevations in interface ElevationCalculator
Parameters:
mapData - map data without elevation profiles; != null
eleData - terrain elevation data, possibly with points with unknown information; whether null is allowed depends on the implementation

getEleForTags

protected abstract Double getEleForTags(TagGroup tags)
returns the elevation as set explicitly by the tags

Returns:
elevation; null if the tags don't define the elevation