Class OSMRelation
- java.lang.Object
-
- org.opentrafficsim.road.network.factory.osm.OSMRelation
-
- All Implemented Interfaces:
java.io.Serializable
public class OSMRelation extends java.lang.Object implements java.io.Serializable
OSMRelation wraps a set of OSMTags, a set of OSMWays and a set of OSMNodes.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.$LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $, initial version 31 dec. 2014
- Author:
- Moritz Bergmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OSMRelation(long id)
Construct a new OSMRelation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNode(java.lang.Long node)
Add one OSMNode id to this OSMRelation.void
addTag(OSMTag tag)
Add an OSMTag to this OSMRelation.void
addWay(java.lang.Long way)
Add one OSMWay id to this OSMRelation.long
getId()
java.util.List<OSMTag>
getMatchingTags(java.lang.String key)
Retrieve the OSMTags of this OSMRelation that have a specified key.java.util.List<java.lang.Long>
getNodes()
Retrieve the list of OSMNode ids of this OSMRelation.java.util.List<OSMTag>
getTaglist()
Retrieve the list of OSMTags of this OSMRelation.java.util.List<java.lang.Long>
getWays()
Retrieve the list of OSMWay ids of this OSMRelation.java.lang.String
toString()
-
-
-
Method Detail
-
getId
public final long getId()
- Returns:
- id
-
getTaglist
public final java.util.List<OSMTag> getTaglist()
Retrieve the list of OSMTags of this OSMRelation.- Returns:
- List<OSMTag>; the list of OSMTags of this OSMRelation; modifications of the returned list are reflected in this OSMWay.
-
addTag
public final void addTag(OSMTag tag)
Add an OSMTag to this OSMRelation.- Parameters:
tag
- OSMTag; the OSMTag that will be added
-
getWays
public final java.util.List<java.lang.Long> getWays()
Retrieve the list of OSMWay ids of this OSMRelation.- Returns:
- List<Long>; the list of OSMWay ids of this OSMRelation; modifications of the returned list are reflected in this OSMWay.
-
addWay
public final void addWay(java.lang.Long way)
Add one OSMWay id to this OSMRelation.- Parameters:
way
- Long; the id of the OSMWay that will be added
-
getNodes
public final java.util.List<java.lang.Long> getNodes()
Retrieve the list of OSMNode ids of this OSMRelation.- Returns:
- List<Long>; the list of OSMNode ids of this OSMRelation; modifications of the returned list are reflected in this OSMWay.
-
addNode
public final void addNode(java.lang.Long node)
Add one OSMNode id to this OSMRelation.- Parameters:
node
- Long; the id of the OSMNode that will be added
-
getMatchingTags
public final java.util.List<OSMTag> getMatchingTags(java.lang.String key)
Retrieve the OSMTags of this OSMRelation that have a specified key.- Parameters:
key
- String; the key of the returned OSMTags- Returns:
- List<OSMTag>; the OSMTags that have the specified key (modifications of the result do not affect this OSMRelation)
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-