org.osm2world.core.map_data.data
public class MapData extends Object
OSMData
, consists of MapElement
s.
Initially contains only a slightly altered representation of OSM
map data. During later conversion steps, additional information is
added to the MapElement
s.Constructor and Description |
---|
MapData(List<MapNode> mapNodes,
List<MapWaySegment> mapWaySegments,
List<MapArea> mapAreas,
AxisAlignedBoundingBoxXZ fileBoundary) |
Modifier and Type | Method and Description |
---|---|
AxisAlignedBoundingBoxXZ |
getBoundary()
returns a boundary based on the bounds in the input file if available,
otherwise returns the same as
getDataBoundary() |
VectorXZ |
getCenter()
calculates the center from the
MapNode s' positions |
AxisAlignedBoundingBoxXZ |
getDataBoundary()
returns a rectangular boundary polygon from the minimum/maximum of
coordinates in the map data
|
Collection<MapArea> |
getMapAreas() |
Iterable<MapElement> |
getMapElements() |
Collection<MapNode> |
getMapNodes() |
Collection<MapWaySegment> |
getMapWaySegments() |
Iterable<WorldObject> |
getWorldObjects()
returns all
WorldObject s from elements in this data set. |
<T> Iterable<T> |
getWorldObjects(Class<T> type)
returns all
WorldObject s from elements in this data set
that are instances of a certain type. |
public MapData(List<MapNode> mapNodes, List<MapWaySegment> mapWaySegments, List<MapArea> mapAreas, AxisAlignedBoundingBoxXZ fileBoundary)
public Iterable<MapElement> getMapElements()
public Collection<MapArea> getMapAreas()
public Collection<MapWaySegment> getMapWaySegments()
public Collection<MapNode> getMapNodes()
public AxisAlignedBoundingBoxXZ getDataBoundary()
public AxisAlignedBoundingBoxXZ getBoundary()
getDataBoundary()
public Iterable<WorldObject> getWorldObjects()
WorldObject
s from elements in this data set.public <T> Iterable<T> getWorldObjects(Class<T> type)
WorldObject
s from elements in this data set
that are instances of a certain type.
Can be used, for example, to access all
TerrainBoundaryWorldObject
s in the grid.