Class OSMNode
- java.lang.Object
-
- org.opentrafficsim.road.network.factory.osm.OSMNode
-
- All Implemented Interfaces:
java.io.Serializable
public class OSMNode extends java.lang.Object implements java.io.Serializable
OpenStreetmap Node.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-08-23 00:48:01 +0200 (Sun, 23 Aug 2015) $, @version $Revision: 1291 $, by $Author: averbraeck $, initial version 31 dec. 2014
- Author:
- Moritz Bergmann
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
linksOriginating
The number of OSMLinks originating at this OSMNode; i.e.int
linksTerminating
The number of OSMLinks ending at this OSMNode; i.e.
-
Constructor Summary
Constructors Constructor Description OSMNode(long id, double longitude, double latitude)
Construct a new OSMNode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTag(OSMTag tag)
Add a tag to this OSMNode.long
getId()
double
getLatitude()
double
getLongitude()
OTSRoadNode
getOtsNode()
OSMTag
getTag(java.lang.String key)
Retrieve a tag of this OSMNode.boolean
hasNoTags()
boolean
isCrossing()
boolean
isStopSign()
boolean
isTrafficSignal()
boolean
isYieldSign()
void
setCrossing(boolean crossing)
void
setOtsNode(OTSRoadNode n)
void
setStopSign(boolean stopSign)
void
setTrafficSignal(boolean trafficSignal)
void
setYieldSign(boolean yieldSign)
java.lang.String
toString()
-
-
-
Method Detail
-
getId
public final long getId()
- Returns:
- Id
-
getLongitude
public final double getLongitude()
- Returns:
- longitude
-
getLatitude
public final double getLatitude()
- Returns:
- latitude
-
getTag
public final OSMTag getTag(java.lang.String key)
Retrieve a tag of this OSMNode.- Parameters:
key
- String; the key of the tag to retrieve- Returns:
- OSMTag, or null if this OSMNode has no tag with the specified key
-
addTag
public final void addTag(OSMTag tag)
Add a tag to this OSMNode.- Parameters:
tag
- OSMTag; the tag to add to this OSMNode
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isTrafficSignal
public final boolean isTrafficSignal()
- Returns:
- trafficSignal.
-
setTrafficSignal
public final void setTrafficSignal(boolean trafficSignal)
- Parameters:
trafficSignal
- boolean; set trafficSignal.
-
isStopSign
public final boolean isStopSign()
- Returns:
- stopSign.
-
setStopSign
public final void setStopSign(boolean stopSign)
- Parameters:
stopSign
- boolean; set stopSign.
-
isYieldSign
public final boolean isYieldSign()
- Returns:
- yieldSign.
-
setYieldSign
public final void setYieldSign(boolean yieldSign)
- Parameters:
yieldSign
- boolean; set yieldSign.
-
isCrossing
public final boolean isCrossing()
- Returns:
- crossing.
-
setCrossing
public final void setCrossing(boolean crossing)
- Parameters:
crossing
- boolean; set crossing.
-
setOtsNode
public final void setOtsNode(OTSRoadNode n)
- Parameters:
n
- OTSRoadNode; OTSRoadNode<String>
-
getOtsNode
public final OTSRoadNode getOtsNode()
- Returns:
- OTSNodeOTSNode<String> - The associated OTS Node.
-
hasNoTags
public final boolean hasNoTags()
- Returns:
- boolean; true if this OSMNode has no tags; false otherwise
-
-