Package org.heigit.ohsome.oshdb.impl.osh
Class OSHNodeImpl
- java.lang.Object
-
- org.heigit.ohsome.oshdb.impl.osh.OSHEntityImpl
-
- org.heigit.ohsome.oshdb.impl.osh.OSHNodeImpl
-
- All Implemented Interfaces:
Serializable
,Comparable<OSHEntity>
,Iterable<OSMNode>
,OSHEntity
,OSHNode
,OSHDBBoundable
public class OSHNodeImpl extends OSHEntityImpl implements OSHNode, Iterable<OSMNode>, Serializable
An implementation of theOSHNode
interface.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.heigit.ohsome.oshdb.impl.osh.OSHEntityImpl
OSHEntityImpl.Builder, OSHEntityImpl.CommonEntityProps, OSHEntityImpl.EntityVersionIterator<T extends OSMEntity>, OSHEntityImpl.OSHEntitySerializationProxy
-
-
Field Summary
-
Fields inherited from class org.heigit.ohsome.oshdb.impl.osh.OSHEntityImpl
baseId, baseLatitude, baseLongitude, baseTimestamp, CHANGED_TAGS, CHANGED_USER_ID, data, dataLength, dataOffset, header, HEADER_HAS_TAGS, HEADER_MULTIVERSION, HEADER_TIMESTAMPS_NOT_IN_ORDER, id, keys, length, maxLat, maxLon, minLat, minLon, offset, VERSION_REVERSE_ORDER
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OSHNodeImpl
build(List<OSMNode> versions)
static OSHNodeImpl
build(List<OSMNode> versions, long baseId, long baseTimestamp, int baseLongitude, int baseLatitude)
Creates aOSHNode
bases on the given list of node versions.static ByteBuffer
buildRecord(List<OSMNode> versions, long baseId, long baseTimestamp, int baseLongitude, int baseLatitude)
Creates aOSHNode
bases on the given list of node versions, but returns the underlying ByteBuffer instead of an instance ofOSHNode
.OSMType
getType()
Iterable<OSMNode>
getVersions()
boolean
hasTags()
static OSHNodeImpl
instance(byte[] data, int offset, int length)
static OSHNodeImpl
instance(byte[] data, int offset, int length, long baseNodeId, long baseTimestamp, int baseLongitude, int baseLatitude)
Creates an instances ofOSHNodeImpl
from the given byte array.Iterator<OSMNode>
iterator()
String
toString()
-
Methods inherited from class org.heigit.ohsome.oshdb.impl.osh.OSHEntityImpl
compareTo, equals, getBoundable, getData, getId, getLength, getMaxLatitude, getMaxLongitude, getMinLatitude, getMinLongitude, getTagKeys, hashCode, hasTagKey, hasTagKey, readBaseAndKeys, readBbox, readCommon, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.heigit.ohsome.oshdb.OSHDBBoundable
coveredBy, getBoundingBox, intersection, intersects, isPoint, isValid
-
Methods inherited from interface org.heigit.ohsome.oshdb.osh.OSHEntity
getBoundable, getId, getNodes, getTagKeys, getWays, hasTagKey, hasTagKey
-
-
-
-
Method Detail
-
instance
public static OSHNodeImpl instance(byte[] data, int offset, int length)
-
instance
public static OSHNodeImpl instance(byte[] data, int offset, int length, long baseNodeId, long baseTimestamp, int baseLongitude, int baseLatitude)
Creates an instances ofOSHNodeImpl
from the given byte array.
-
getType
public OSMType getType()
-
getVersions
public Iterable<OSMNode> getVersions()
- Specified by:
getVersions
in interfaceOSHEntity
- Specified by:
getVersions
in interfaceOSHNode
-
build
public static OSHNodeImpl build(List<OSMNode> versions)
-
build
public static OSHNodeImpl build(List<OSMNode> versions, long baseId, long baseTimestamp, int baseLongitude, int baseLatitude)
Creates aOSHNode
bases on the given list of node versions.
-
buildRecord
public static ByteBuffer buildRecord(List<OSMNode> versions, long baseId, long baseTimestamp, int baseLongitude, int baseLatitude)
Creates aOSHNode
bases on the given list of node versions, but returns the underlying ByteBuffer instead of an instance ofOSHNode
.
-
hasTags
public boolean hasTags()
-
toString
public String toString()
- Overrides:
toString
in classOSHEntityImpl
-
-