org.osm2world.core.map_data.data
Class MapData

Object
  extended by MapData

public class MapData
extends Object

OSM2World's abstraction of OSMData, consists of MapElements. Initially contains only a slightly altered representation of OSM map data. During later conversion steps, additional information is added to the MapElements.


Constructor Summary
MapData(List<MapNode> mapNodes, List<MapWaySegment> mapWaySegments, List<MapArea> mapAreas)
           
 
Method Summary
 AxisAlignedBoundingBoxXZ getBoundary()
          returns a rectangular boundary polygon from the minimum/maximum of coordinates in the map data
 VectorXZ getCenter()
          calculates the center from the MapNodes' positions
 Collection<MapArea> getMapAreas()
           
 Iterable<MapElement> getMapElements()
           
 Collection<MapNode> getMapNodes()
           
 Collection<MapWaySegment> getMapWaySegments()
           
 Iterable<WorldObject> getWorldObjects()
          returns all WorldObjects from elements in this data set.
<T> Iterable<T>
getWorldObjects(Class<T> type)
          returns all WorldObjects from elements in this data set that are instances of a certain type.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapData

public MapData(List<MapNode> mapNodes,
               List<MapWaySegment> mapWaySegments,
               List<MapArea> mapAreas)
Method Detail

getMapElements

public Iterable<MapElement> getMapElements()

getMapAreas

public Collection<MapArea> getMapAreas()

getMapWaySegments

public Collection<MapWaySegment> getMapWaySegments()

getMapNodes

public Collection<MapNode> getMapNodes()

getBoundary

public AxisAlignedBoundingBoxXZ getBoundary()
returns a rectangular boundary polygon from the minimum/maximum of coordinates in the map data


getCenter

public VectorXZ getCenter()
calculates the center from the MapNodes' positions


getWorldObjects

public Iterable<WorldObject> getWorldObjects()
returns all WorldObjects from elements in this data set.


getWorldObjects

public <T> Iterable<T> getWorldObjects(Class<T> type)
returns all WorldObjects from elements in this data set that are instances of a certain type. Can be used, for example, to access all TerrainBoundaryWorldObjects in the grid.