Package org.openstreetmap.josm.data.osm
Class NodeData
java.lang.Object
org.openstreetmap.josm.data.osm.AbstractPrimitive
org.openstreetmap.josm.data.osm.PrimitiveData
org.openstreetmap.josm.data.osm.NodeData
- All Implemented Interfaces:
Serializable,Comparable<IPrimitive>,ILatLon,IQuadBucketType,IFilterablePrimitive,INode,IPrimitive,PrimitiveId,Stylable,Tagged
The data on a single node (tags and position) that is stored in the database
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final UniqueIdGeneratorprivate doubleprivate doubleprivate static final longFields inherited from class org.openstreetmap.josm.data.osm.AbstractPrimitive
changesetId, FLAG_ALL_REFERRERS_DOWNLOADED, 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, mappaintCacheIdx, timestamp, user, versionFields inherited from interface org.openstreetmap.josm.data.coor.ILatLon
MAX_SERVER_PRECISIONFields inherited from interface org.openstreetmap.josm.data.osm.Tagged
MAX_TAG_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(PrimitiveVisitor visitor) Makes the given visitor visit this primitive.getBBox()Fetches the bounding box of the primitive.getCoor()Returns lat/lon coordinates of this node.Returns the unique identifier generator.getType()Gets the type of object represented by this object.booleanDetermines if this object has valid coordinates.booleanisReferredByWays(int n) Return true, if this primitive is referred by at least n waysdoublelat()Returns the latitude, i.e., the north-south position in degrees.doublelon()Returns the longitude, i.e., the east-west position in degrees.makeCopy()Returns a copy of this primitive data.final voidSets lat/lon coordinates of this node.voidsetEastNorth(EastNorth eastNorth) Sets east/north coordinates of this node.toString()Methods inherited from class org.openstreetmap.josm.data.osm.PrimitiveData
clearCachedStyle, declareCachedStyleUpToDate, getCachedStyle, getDataSet, getReferrers, hasDirectionKeys, isAnnotated, isCachedStyleUpToDate, isHighlighted, isTagged, keysChangedImpl, reversedDirection, setCachedStyle, setHighlighted, setId, setIncomplete, setVersion, visitReferrersMethods inherited from class org.openstreetmap.josm.data.osm.AbstractPrimitive
clearOsmMetadata, cloneFrom, doGet, get, getChangesetId, getDisabledType, getDiscardableKeys, getFlagsAsString, getHiddenType, getId, getIgnoreCase, getInstant, getInterestingTags, getKeys, getNumKeys, getRawTimestamp, getUninterestingKeys, getUniqueId, getUser, getVersion, getWorkInProgressKeys, hasKey, hasKey, hasKeys, isDeleted, isDisabled, isDisabledAndHidden, isDrawable, isIncomplete, isModified, isNew, isNewOrUndeleted, isPreserved, isReferrersDownloaded, isTimestampEmpty, isUndeleted, isUninterestingKey, isUsable, isVisible, keys, keySet, put, putAll, remove, removeAll, setChangesetId, setDeleted, setDisabledState, setDisabledType, setHiddenType, setInstant, setKeys, setKeys, setModified, setOsmId, setRawTimestamp, setReferrersDownloaded, setUser, setVisible, unsetDisabledState, updateFlags, updateFlagsChanged, visitKeysMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.data.coor.ILatLon
bearing, distanceSq, distanceSq, equalsEpsilon, equalsEpsilon, getEastNorth, greatCircleDistance, interpolateMethods inherited from interface org.openstreetmap.josm.data.osm.INode
compareTo, getDisplayName, getEastNorth, isConnectionNodeMethods inherited from interface org.openstreetmap.josm.data.osm.IPrimitive
getChangesetId, getChildren, getDataSet, getDisplayType, getId, getInstant, getInterestingTags, getLocalName, getName, getOsmId, getOsmPrimitiveId, getPrimitiveId, getRawTimestamp, getReferrers, getReferrers, getStyleCacheSyncObject, getUser, getVersion, hasDirectionKeys, hasSameInterestingTags, isAnnotated, isDeleted, isDisabled, isDisabledAndHidden, isDrawable, isHighlighted, isIncomplete, isMemberOfSelected, isModified, isMultipolygon, isNewOrUndeleted, isOuterMemberOfSelected, isPreserved, isReferrersDownloaded, isSelectable, isSelected, isTagged, isTimestampEmpty, isUndeleted, isUsable, isVisible, reversedDirection, setChangesetId, setDeleted, setHighlighted, setInstant, setModified, setOsmId, setRawTimestamp, setReferrersDownloaded, setUser, setVisible, visitReferrersMethods inherited from interface org.openstreetmap.josm.data.osm.PrimitiveId
getUniqueId, isNewMethods inherited from interface org.openstreetmap.josm.data.osm.Stylable
clearCachedStyle, declareCachedStyleUpToDate, getCachedStyle, isCachedStyleUpToDate, setCachedStyleMethods inherited from interface org.openstreetmap.josm.data.osm.Tagged
get, getKeys, getNumKeys, hasKey, hasKeys, hasTag, hasTag, hasTag, hasTag, hasTagDifferent, hasTagDifferent, hasTagDifferent, isKeyFalse, isKeyTrue, keys, keySet, put, put, putAll, remove, removeAll, setKeys, visitKeys
-
Field Details
-
serialVersionUID
- See Also:
-
idGenerator
-
lat
-
lon
-
-
Constructor Details
-
NodeData
public NodeData()Constructs a newNodeData. -
NodeData
Constructs a newNodeDatawith given id.- Parameters:
id- id- Since:
- 12017
-
NodeData
Constructs a newNodeData.- Parameters:
data- node data to copy
-
-
Method Details
-
lat
Description copied from interface:ILatLonReturns the latitude, i.e., the north-south position in degrees.- Specified by:
latin interfaceILatLon- Returns:
- the latitude or NaN if
ILatLon.isLatLonKnown()returns false
-
lon
Description copied from interface:ILatLonReturns the longitude, i.e., the east-west position in degrees.- Specified by:
lonin interfaceILatLon- Returns:
- the longitude or NaN if
ILatLon.isLatLonKnown()returns false
-
isLatLonKnown
Description copied from interface:ILatLonDetermines if this object has valid coordinates.- Specified by:
isLatLonKnownin interfaceILatLon- Returns:
trueif this object has valid coordinates
-
getCoor
Description copied from interface:INodeReturns lat/lon coordinates of this node. -
setCoor
Description copied from interface:INodeSets lat/lon coordinates of this node. -
setEastNorth
Description copied from interface:INodeSets east/north coordinates of this node.- Specified by:
setEastNorthin interfaceINode- Parameters:
eastNorth- east/north coordinates of this node
-
makeCopy
Description copied from class:PrimitiveDataReturns a copy of this primitive data.- Specified by:
makeCopyin classPrimitiveData- Returns:
- a copy of this primitive data
-
toString
- Overrides:
toStringin classPrimitiveData
-
getType
Description copied from interface:PrimitiveIdGets the type of object represented by this object. Note that this should return the base primitive type (OsmPrimitiveType.NODE,OsmPrimitiveType.WAY, andOsmPrimitiveType.RELATION).- Specified by:
getTypein interfacePrimitiveId- Returns:
- the object type
- See Also:
-
accept
Description copied from interface:IPrimitiveMakes the given visitor visit this primitive.- Specified by:
acceptin interfaceIPrimitive- Parameters:
visitor- visitor
-
getBBox
Description copied from interface:IPrimitiveFetches the bounding box of the primitive. Since 17752, the returned bounding box might be immutable, i.e., modifying calls throw anUnsupportedOperationException.- Specified by:
getBBoxin interfaceIPrimitive- Specified by:
getBBoxin interfaceIQuadBucketType- Returns:
- Bounding box of the object
-
isReferredByWays
Description copied from interface:INodeReturn true, if this primitive is referred by at least n ways- Specified by:
isReferredByWaysin interfaceINode- Parameters:
n- Minimal number of ways to return true. Must be positive- Returns:
trueif this primitive is referred by at least n ways
-
getIdGenerator
Description copied from class:AbstractPrimitiveReturns the unique identifier generator.- Specified by:
getIdGeneratorin classAbstractPrimitive- Returns:
- the unique identifier generator
-