Class WayData

    • Constructor Detail

      • WayData

        public WayData()
        Constructs a new NodeData.
      • WayData

        public WayData​(long id)
        Constructs a new WayData with given id.
        Parameters:
        id - id
        Since:
        12017
      • WayData

        public WayData​(WayData data)
        Constructs a new WayData.
        Parameters:
        data - way data to copy
    • Method Detail

      • getNodes

        public java.util.List<NodeDatagetNodes()
        Description copied from interface: IWay
        Returns the list of nodes in this way.
        Specified by:
        getNodes in interface IWay<NodeData>
        Returns:
        the list of nodes in this way
      • getNode

        public NodeData getNode​(int index)
        Description copied from interface: IWay
        Replies the node at position index.
        Specified by:
        getNode in interface IWay<NodeData>
        Parameters:
        index - the position
        Returns:
        the node at position index
      • getNodeIds

        public java.util.List<java.lang.Long> getNodeIds()
        Description copied from interface: IWay
        Returns the list of node ids in this way.
        Specified by:
        getNodeIds in interface IWay<NodeData>
        Returns:
        the list of node ids in this way
      • getNodesCount

        public int getNodesCount()
        Description copied from interface: IWay
        Replies the number of nodes in this way.
        Specified by:
        getNodesCount in interface IWay<NodeData>
        Returns:
        the number of nodes in this way.
      • getNodeId

        public long getNodeId​(int idx)
        Description copied from interface: IWay
        Returns id of the node at given index.
        Specified by:
        getNodeId in interface IWay<NodeData>
        Parameters:
        idx - node index
        Returns:
        id of the node at given index
      • isClosed

        public boolean isClosed()
        Description copied from interface: IWay
        Determines if this way is closed.
        Specified by:
        isClosed in interface IWay<NodeData>
        Returns:
        true if this way is closed, false otherwise
      • setNodes

        public void setNodes​(java.util.List<NodeData> nodes)
        Description copied from interface: IWay
        Set new list of nodes to way. This method is preferred to multiple calls to addNode/removeNode and similar methods because nodes are internally saved as array which means lower memory overhead but also slower modifying operations.
        Specified by:
        setNodes in interface IWay<NodeData>
        Parameters:
        nodes - New way nodes. Can be null, in that case all way nodes are removed
      • setNodeIds

        public void setNodeIds​(java.util.List<java.lang.Long> nodes)
        Sets the nodes array
        Parameters:
        nodes - The nodes this way consists of
        Since:
        13907
      • getBBox

        public BBox getBBox()
        Description copied from interface: IPrimitive
        Fetches the bounding box of the primitive. Since 17752, the returned bounding box might be immutable, i.e., modifying calls throw an UnsupportedOperationException.
        Specified by:
        getBBox in interface IPrimitive
        Specified by:
        getBBox in interface IQuadBucketType
        Returns:
        Bounding box of the object
      • isFirstLastNode

        public boolean isFirstLastNode​(INode n)
        Description copied from interface: IWay
        Replies true if the given node is the first or the last one of this way, false otherwise.
        Specified by:
        isFirstLastNode in interface IWay<NodeData>
        Parameters:
        n - The node to test
        Returns:
        true if the n is the first or the last node, false otherwise.
      • isInnerNode

        public boolean isInnerNode​(INode n)
        Description copied from interface: IWay
        Replies true if the given node is an inner node of this way, false otherwise.
        Specified by:
        isInnerNode in interface IWay<NodeData>
        Parameters:
        n - The node to test
        Returns:
        true if the n is an inner node, false otherwise.