org.osm2world.core.map_data.data
public class MapArea extends Object implements MapElement
Constructor and Description |
---|
MapArea(OSMElement objectWithTags,
List<MapNode> nodes) |
MapArea(OSMElement objectWithTags,
List<MapNode> nodes,
List<List<MapNode>> holes) |
MapArea(OSMElement objectWithTags,
List<MapNode> nodes,
List<List<MapNode>> holes,
PolygonWithHolesXZ polygon) |
Modifier and Type | Method and Description |
---|---|
void |
addOverlap(MapOverlap<?,?> overlap) |
void |
addRepresentation(AreaWorldObject representation)
adds a visual representation for this area
|
Collection<MapAreaSegment> |
getAreaSegments()
returns the segments making up this area's outer and inner boundaries
|
AxisAlignedBoundingBoxXZ |
getAxisAlignedBoundingBoxXZ() |
List<MapNode> |
getBoundaryNodes() |
Collection<List<MapNode>> |
getHoles() |
int |
getLayer() |
OSMElement |
getOsmObject()
returns the way or relation with the tags for this area
|
SimplePolygonXZ |
getOuterPolygon() |
Collection<MapOverlap<?,?>> |
getOverlaps()
returns all overlaps between this
MapElement
and other MapElement s. |
PolygonWithHolesXZ |
getPolygon()
returns the area as a polygon.
|
AreaWorldObject |
getPrimaryRepresentation()
returns the primary representation, or null if the object doesn't have any.
|
List<AreaWorldObject> |
getRepresentations()
returns the visual representations of this element.
|
TagGroup |
getTags()
returns the tags of the underlying
OSMElement |
static SimplePolygonXZ |
polygonFromMapNodeLoop(List<MapNode> nodes) |
String |
toString() |
public MapArea(OSMElement objectWithTags, List<MapNode> nodes)
public MapArea(OSMElement objectWithTags, List<MapNode> nodes, List<List<MapNode>> holes)
public MapArea(OSMElement objectWithTags, List<MapNode> nodes, List<List<MapNode>> holes, PolygonWithHolesXZ polygon)
public static final SimplePolygonXZ polygonFromMapNodeLoop(List<MapNode> nodes)
public List<MapNode> getBoundaryNodes()
public int getLayer()
getLayer
in interface MapElement
public Collection<List<MapNode>> getHoles()
public OSMElement getOsmObject()
public TagGroup getTags()
MapElement
OSMElement
getTags
in interface MapElement
public PolygonWithHolesXZ getPolygon()
public SimplePolygonXZ getOuterPolygon()
public Collection<MapAreaSegment> getAreaSegments()
public List<AreaWorldObject> getRepresentations()
MapElement
getRepresentations
in interface MapElement
public AreaWorldObject getPrimaryRepresentation()
MapElement
getPrimaryRepresentation
in interface MapElement
MapElement.getRepresentations()
public void addRepresentation(AreaWorldObject representation)
public void addOverlap(MapOverlap<?,?> overlap)
public Collection<MapOverlap<?,?>> getOverlaps()
MapElement
MapElement
and other MapElement
s.getOverlaps
in interface MapElement
public AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
getAxisAlignedBoundingBoxXZ
in interface IntersectionTestObject
public String toString()
toString
in class Object