public class OSMNode extends Object implements Serializable
Copyright (c) 2013-2019 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
Modifier and Type | Field and 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 and Description |
---|
OSMNode(long id,
double longitude,
double latitude)
Construct a new OSMNode.
|
Modifier and Type | Method and Description |
---|---|
void |
addTag(OSMTag tag)
Add a tag to this OSMNode.
|
long |
getId() |
double |
getLatitude() |
double |
getLongitude() |
OTSNode |
getOtsNode() |
OSMTag |
getTag(String key)
Retrieve a tag of this OSMNode.
|
boolean |
hasNoTags() |
boolean |
isCrossing() |
boolean |
isStopSign() |
boolean |
isTrafficSignal() |
boolean |
isYieldSign() |
void |
setCrossing(boolean crossing) |
void |
setOtsNode(OTSNode n) |
void |
setStopSign(boolean stopSign) |
void |
setTrafficSignal(boolean trafficSignal) |
void |
setYieldSign(boolean yieldSign) |
String |
toString() |
public int linksOriginating
public int linksTerminating
public OSMNode(long id, double longitude, double latitude)
id
- long; id of the new OSMNodelongitude
- double; longitude of the new OSMNodelatitude
- double; latitude of the new OSMNodepublic final long getId()
public final double getLongitude()
public final double getLatitude()
public final OSMTag getTag(String key)
key
- String; the key of the tag to retrievepublic final void addTag(OSMTag tag)
tag
- OSMTag; the tag to add to this OSMNodepublic final boolean isTrafficSignal()
public final void setTrafficSignal(boolean trafficSignal)
trafficSignal
- boolean; set trafficSignal.public final boolean isStopSign()
public final void setStopSign(boolean stopSign)
stopSign
- boolean; set stopSign.public final boolean isYieldSign()
public final void setYieldSign(boolean yieldSign)
yieldSign
- boolean; set yieldSign.public final boolean isCrossing()
public final void setCrossing(boolean crossing)
crossing
- boolean; set crossing.public final void setOtsNode(OTSNode n)
n
- OTSNode; OTSNode<String>public final OTSNode getOtsNode()
public final boolean hasNoTags()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.