public class TLcdLonLatFloatPoint extends ALcd2DEditablePoint implements ILcd2DEditablePoint
ILcd2DEditablePoint
in the geodetic space.
All longitude/latitude coordinates are expressed in degrees.
This class is thread-hostile, even for read-only access, since point instances are being reused from an internal pool.
Constructor and Description |
---|
TLcdLonLatFloatPoint() |
TLcdLonLatFloatPoint(double aLongitude,
double aLatitude) |
TLcdLonLatFloatPoint(float aLongitude,
float aLatitude) |
TLcdLonLatFloatPoint(ILcdPoint aPoint) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates and returns a copy of this object, by delegating to
Object.clone() . |
ILcd2DEditableBounds |
cloneAs2DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd2DEditableBounds . |
ILcd2DEditablePoint |
cloneAs2DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd2DEditablePoint . |
ILcd3DEditableBounds |
cloneAs3DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd3DEditableBounds . |
ILcd3DEditablePoint |
cloneAs3DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd3DEditablePoint . |
boolean |
contains2D(double aLon,
double aLat)
Checks whether this
ALcdPoint is equal to the given point in
the 2D cartesian plane. |
boolean |
contains2D(double aLon,
double aLat,
double aWidth,
double aHeight)
Checks whether this
ILcdBounds object contains the given rectangle in
the 2D space. |
double |
getCosX()
Returns cos(
getX() * DEG2RAD ). |
double |
getCosY()
Returns cos(
getY() * DEG2RAD ). |
double |
getSinX()
Returns sin(
getX() * DEG2RAD ). |
double |
getSinY()
Returns sin(
getY() * DEG2RAD ). |
double |
getTanX()
Returns tan(
getX() * DEG2RAD ). |
double |
getTanY()
Returns tan(
getY() * DEG2RAD ). |
double |
getX()
Returns the x coordinate of this
ILcdPoint . |
double |
getY()
Returns the y coordinate of this
ILcdPoint . |
double |
getZ()
Returns the z coordinate of this
ILcdPoint . |
boolean |
interacts2D(double aLon,
double aLat,
double aWidth,
double aHeight)
Checks whether this
ILcdBounds object interacts with the given rectangle in
the 2D space. |
void |
move2D(double aLon,
double aLat)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
String |
toString() |
move2D, translate2D
contains2D, contains3D, contains3D, contains3D, equals, getBounds, getDepth, getFocusPoint, getHeight, getLocation, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getPoint, getPointCount, getWidth, hashCode, interacts2D, interacts3D, interacts3D, isDefined
contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
move2D, translate2D
contains2D, contains3D, contains3D, getFocusPoint
getBounds
getPointSFCT, getX, getY, getZ
getCenter
public TLcdLonLatFloatPoint()
public TLcdLonLatFloatPoint(float aLongitude, float aLatitude)
public TLcdLonLatFloatPoint(double aLongitude, double aLatitude)
public TLcdLonLatFloatPoint(ILcdPoint aPoint)
public final double getX()
ILcdPoint
ILcdPoint
.public final double getY()
ILcdPoint
ILcdPoint
.public final double getZ()
ILcdPoint
ILcdPoint
.getZ
in interface ILcdPoint
getZ
in class ALcd2DEditablePoint
public final double getCosX()
ILcdPoint
getX()
* DEG2RAD ).public final double getCosY()
ILcdPoint
getY()
* DEG2RAD ).public final double getSinX()
ILcdPoint
getX()
* DEG2RAD ).public final double getSinY()
ILcdPoint
getY()
* DEG2RAD ).public final double getTanX()
ILcdPoint
getX()
* DEG2RAD ).public final double getTanY()
ILcdPoint
getY()
* DEG2RAD ).public final ILcd2DEditablePoint cloneAs2DEditablePoint()
ILcdPoint
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,cloneAs2DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd2DEditablePoint
public final ILcd3DEditablePoint cloneAs3DEditablePoint()
ILcdPoint
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,cloneAs3DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd3DEditablePoint
public final void move2D(double aLon, double aLat)
ILcd2DEditableShape
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aLon
- the x coordinate of the point.aLat
- the y coordinate of the point.public boolean contains2D(double aLon, double aLat)
ALcdPoint
ALcdPoint
is equal to the given point in
the 2D cartesian plane.contains2D
in interface ILcdShape
contains2D
in class ALcdPoint
aLon
- the x coordinate of the point.aLat
- the y coordinate of the point.public boolean interacts2D(double aLon, double aLat, double aWidth, double aHeight)
ILcdBounds
ILcdBounds
object interacts with the given rectangle in
the 2D space. Only the first two dimensions of the ILcdBounds
object
are considered.
If this bounds is undefined
, the result is false.
interacts2D
in interface ILcdBounds
interacts2D
in class ALcdPoint
aLon
- the x coordinate of the rectangle.aLat
- the y coordinate of the rectangle.aWidth
- the width of the rectangle.aHeight
- the height of the rectangle.true
if this ILcdBounds
object touches or overlaps to
any extent with the given rectangle, false
otherwise.public boolean contains2D(double aLon, double aLat, double aWidth, double aHeight)
ILcdBounds
ILcdBounds
object contains the given rectangle in
the 2D space. Only the first two dimensions of the ILcdBounds
object
are considered.
If this bounds is undefined
, the result is false.
contains2D
in interface ILcdBounds
contains2D
in class ALcdPoint
aLon
- the x coordinate of the rectangle.aLat
- the y coordinate of the rectangle.aWidth
- the width of the rectangle.aHeight
- the height of the rectangle.public final ILcd2DEditableBounds cloneAs2DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs2DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd2DEditableBounds
public final ILcd3DEditableBounds cloneAs3DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs3DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd3DEditableBounds
public String toString()
toString
in class ALcd2DEditablePoint
public Object clone()
ALcdShape
Object.clone()
. Extensions should delegate to this implementation
with super.clone()
, in order to create an object instance of
the right type, with all fields copied. They then should explicitly
clone any non-primitive fields for which a deeper clone is required.clone
in interface ILcdCloneable
clone
in class ALcdShape
Object.clone()