public class NodeData extends PrimitiveData implements INode
Modifier and Type | Field and Description |
---|---|
private double |
lat |
private double |
lon |
private static long |
serialVersionUID |
changesetId, FLAG_ANNOTATED, FLAG_DELETED, FLAG_DIRECTION_REVERSED, FLAG_DISABLED, FLAG_DISABLED_TYPE, FLAG_HAS_DIRECTIONS, FLAG_HIDDEN_TYPE, FLAG_HIDE_IF_DISABLED, FLAG_HIGHLIGHTED, FLAG_INCOMPLETE, FLAG_MODIFIED, FLAG_PRESERVED, FLAG_TAGGED, FLAG_VISIBLE, flags, id, keys, timestamp, user, version
MAX_TAG_LENGTH
Constructor and Description |
---|
NodeData()
Constructs a new
NodeData . |
NodeData(long id)
Constructs a new
NodeData with given id. |
NodeData(NodeData data)
Constructs a new
NodeData . |
Modifier and Type | Method and Description |
---|---|
void |
accept(PrimitiveVisitor visitor)
Makes the given visitor visit this primitive.
|
BBox |
getBBox()
Fetches the bounding box of the primitive.
|
LatLon |
getCoor()
Returns lat/lon coordinates of this node.
|
OsmPrimitiveType |
getType()
Gets the type of object represented by this object.
|
boolean |
isLatLonKnown()
Determines if this object has valid coordinates.
|
boolean |
isReferredByWays(int n)
Return true, if this primitive is referred by at least n ways
|
double |
lat()
Returns the latitude, i.e., the north-south position in degrees.
|
double |
lon()
Returns the longitude, i.e., the east-west position in degrees.
|
NodeData |
makeCopy()
Returns a copy of this primitive data.
|
void |
setCoor(LatLon coor)
Sets lat/lon coordinates of this node.
|
void |
setEastNorth(EastNorth eastNorth)
Sets east/north coordinates of this node.
|
java.lang.String |
toString() |
declareCachedStyleUpToDate, getCachedStyle, getDataSet, getFilteredList, getReferrers, hasDirectionKeys, isAnnotated, isCachedStyleUpToDate, isHighlighted, isTagged, keysChangedImpl, reversedDirection, setCachedStyle, setHighlighted, setId, setIncomplete, setVersion, visitReferrers
advanceUniqueId, clearOsmMetadata, cloneFrom, currentUniqueId, generateUniqueId, get, getChangesetId, getDiscardableKeys, getFlagsAsString, getId, getIgnoreCase, getInterestingTags, getKeys, getNumKeys, getRawTimestamp, getTimestamp, getUninterestingKeys, getUniqueId, getUser, getVersion, getWorkInProgressKeys, hasKey, hasKey, hasKeys, isDeleted, isIncomplete, isModified, isNew, isNewOrUndeleted, isTimestampEmpty, isUndeleted, isUninterestingKey, isUsable, isVisible, keySet, put, remove, removeAll, setChangesetId, setDeleted, setKeys, setKeys, setModified, setOsmId, setRawTimestamp, setTimestamp, setUser, setVisible, updateFlags, visitKeys
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compareTo, getDisplayName, getEastNorth, isConnectionNode
getChangesetId, getDataSet, getDisplayType, getId, getInterestingTags, getLocalName, getName, getOsmId, getOsmPrimitiveId, getPrimitiveId, getRawTimestamp, getReferrers, getReferrers, getTimestamp, getUser, getVersion, hasDirectionKeys, hasSameInterestingTags, isAnnotated, isDeleted, isDisabled, isDisabledAndHidden, isDrawable, isHighlighted, isIncomplete, isMemberOfSelected, isModified, isMultipolygon, isNewOrUndeleted, isOuterMemberOfSelected, isPreserved, isSelectable, isSelected, isTagged, isTimestampEmpty, isUndeleted, isUsable, isVisible, reversedDirection, setChangesetId, setDeleted, setHighlighted, setModified, setOsmId, setRawTimestamp, setTimestamp, setUser, setVisible, visitReferrers
get, getKeys, getNumKeys, hasKey, hasKeys, hasTag, hasTag, hasTag, hasTag, hasTagDifferent, hasTagDifferent, hasTagDifferent, isKeyFalse, isKeyTrue, keySet, put, put, remove, removeAll, setKeys, visitKeys
getUniqueId, isNew
clearCachedStyle, declareCachedStyleUpToDate, getCachedStyle, isCachedStyleUpToDate, setCachedStyle
getEastNorth
private static final long serialVersionUID
private double lat
private double lon
public NodeData()
NodeData
.public NodeData(long id)
NodeData
with given id.id
- idpublic double lat()
ILatLon
lat
in interface ILatLon
ILatLon.isLatLonKnown()
returns falsepublic double lon()
ILatLon
lon
in interface ILatLon
ILatLon.isLatLonKnown()
returns falsepublic boolean isLatLonKnown()
ILatLon
isLatLonKnown
in interface ILatLon
true
if this object has valid coordinatespublic LatLon getCoor()
INode
public final void setCoor(LatLon coor)
INode
public void setEastNorth(EastNorth eastNorth)
INode
setEastNorth
in interface INode
eastNorth
- east/north coordinates of this nodepublic NodeData makeCopy()
PrimitiveData
makeCopy
in class PrimitiveData
public java.lang.String toString()
toString
in class PrimitiveData
public OsmPrimitiveType getType()
PrimitiveId
getType
in interface PrimitiveId
Node
,
Way
,
Relation
public void accept(PrimitiveVisitor visitor)
IPrimitive
accept
in interface IPrimitive
visitor
- visitorpublic BBox getBBox()
IPrimitive
getBBox
in interface IPrimitive
public boolean isReferredByWays(int n)
INode
isReferredByWays
in interface INode
n
- Minimal number of ways to return true. Must be positivetrue
if this primitive is referred by at least n ways