public class ObjectGPSCoordinate extends LocalAbstractObject implements BinarySerializable
Modifier and Type | Class and Description |
---|---|
protected static class |
ObjectGPSCoordinate.ReferenceEllipsoid
The ReferenceEllipsoid class defines a geodetic reference ellipsoid
used as a standard for geodetic measurements.
|
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Modifier | Constructor and Description |
---|---|
protected |
ObjectGPSCoordinate(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of ObjectGPSCoordinate loaded from binary input buffer.
|
|
ObjectGPSCoordinate(java.io.BufferedReader stream)
Creates a new instance of ObjectGPSCoordinate from stream.
|
|
ObjectGPSCoordinate(float latitude,
float longitude)
Creates a new instance of ObjectGPSCoordinate for the given
latitude and longitude specified in degrees.
|
Modifier and Type | Method and Description |
---|---|
int |
binarySerialize(BinaryOutput output,
BinarySerializator serializator)
Binary-serialize this object into the
output . |
LocalAbstractObject |
cloneRandomlyModify(java.lang.Object... args)
Creates and returns a randomly modified copy of this GPS coordinates.
|
boolean |
dataEquals(java.lang.Object obj)
Data equality functions
|
int |
dataHashCode()
Returns a hash code value for the data of this object.
|
int |
getBinarySize(BinarySerializator serializator)
Returns the exact size of the binary-serialized version of this object in bytes.
|
protected float |
getDistanceImpl(LocalAbstractObject obj,
float distThreshold)
Distance function
|
float |
getLatitude()
Returns the geographic latitude on WGS84 ellipsiod in degrees.
|
float |
getLongitude()
Returns the geographic longitude on WGS84 ellipsiod in degrees.
|
int |
getSize()
Size function
|
java.lang.String |
toString()
Returns a string representation of this abstract object.
|
void |
writeData(java.io.OutputStream stream)
Store this object's data to a text stream.
|
clearSurplusData, clone, clone, create, create, createMetaDistancesHolder, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getMaxDistance, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, parseObjectComment, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream, writeObjectComment
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectKey, getObjectLocatorURI, setObjectKey
public ObjectGPSCoordinate(float latitude, float longitude)
latitude
- the geographic latitude on WGS84 ellipsiod in degreeslongitude
- the geographic longitude on WGS84 ellipsiod in degreespublic ObjectGPSCoordinate(java.io.BufferedReader stream) throws java.io.IOException, java.lang.NumberFormatException
stream
- the text stream from which to read the ObjectGPSCoordinatejava.io.IOException
- if there was an error during reading from the given streamjava.lang.NumberFormatException
- if the data in the stream cannot be converted
to latitude and longitudeprotected ObjectGPSCoordinate(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the buffer to read the ObjectIntVector fromserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error reading from the bufferpublic void writeData(java.io.OutputStream stream) throws java.io.IOException
writeData
in class LocalAbstractObject
stream
- the stream to store this object tojava.io.IOException
- if there was an error while writing to streampublic int getSize()
getSize
in class LocalAbstractObject
public float getLatitude()
public float getLongitude()
public boolean dataEquals(java.lang.Object obj)
dataEquals
in class LocalAbstractObject
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.public int dataHashCode()
LocalAbstractObject
dataHashCode
in class LocalAbstractObject
protected float getDistanceImpl(LocalAbstractObject obj, float distThreshold)
getDistanceImpl
in class LocalAbstractObject
obj
- the object to compute distance todistThreshold
- the threshold value on the distancepublic LocalAbstractObject cloneRandomlyModify(java.lang.Object... args)
cloneRandomlyModify
in class LocalAbstractObject
args
- No parameters are required to pass.public java.lang.String toString()
toString
in class AbstractObject
public int binarySerialize(BinaryOutput output, BinarySerializator serializator) throws java.io.IOException
output
.binarySerialize
in interface BinarySerializable
binarySerialize
in class LocalAbstractObject
output
- the data output this object is binary-serialized intoserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error during serializationpublic int getBinarySize(BinarySerializator serializator)
getBinarySize
in interface BinarySerializable
getBinarySize
in class LocalAbstractObject
serializator
- the serializator used to write objects