public class SpatialLocation extends Point2dImpl implements Location, Cloneable
Location in 2d-space. SpatialLocations
contain x and y ordinates.x, y| Constructor and Description |
|---|
SpatialLocation()
Construct the ScaleSpaceLocation at 0, 0.
|
SpatialLocation(float x,
float y)
Construct the SpatialLocation with the given x and y coordinates.
|
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
SpatialLocation |
clone() |
int |
getDimensions() |
Float |
getOrdinate(int dimension)
Get the ordinate value for a specific dimension.
|
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
copy, copyFrom, createRandomPoint, createRandomPoint, equals, fromDoubleArray, getX, getY, hashCode, minus, setOrdinate, setX, setY, toString, transform, translate, translatefinalize, getClass, notify, notifyAll, wait, wait, waitsetOrdinatepublic SpatialLocation()
public SpatialLocation(float x, float y)
x - the x-coordinatey - the y-coordinatepublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinarywriteBinary in class Point2dImplout - sink to write toIOException - an error writing to outpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIwriteASCII in class Point2dImplout - sink to write toIOException - an error writing to outpublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryreadBinary in class Point2dImplin - source to read from.IOException - an error reading inputpublic void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIreadASCII in class Point2dImplin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarybinaryHeader in class Point2dImplpublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIasciiHeader in class Point2dImplpublic Float getOrdinate(int dimension)
CoordinategetOrdinate in interface CoordinategetOrdinate in class Point2dImpldimension - The index of the dimension we are interested inpublic int getDimensions()
getDimensions in interface CoordinategetDimensions in class Point2dImplpublic SpatialLocation clone()
clone in class Point2dImpl