Class OSMRelation

  • All Implemented Interfaces:
    Serializable

    public class OSMRelation
    extends Object
    implements 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 Detail

      • OSMRelation

        public OSMRelation​(long id)
        Construct a new OSMRelation.
        Parameters:
        id - long; the id of the new OSMRelation
    • Method Detail

      • getId

        public final long getId()
        Returns:
        id
      • getTaglist

        public final 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 List<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​(Long way)
        Add one OSMWay id to this OSMRelation.
        Parameters:
        way - Long; the id of the OSMWay that will be added
      • getNodes

        public final List<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​(Long node)
        Add one OSMNode id to this OSMRelation.
        Parameters:
        node - Long; the id of the OSMNode that will be added
      • getMatchingTags

        public final List<OSMTag> getMatchingTags​(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)