Package com.luciad.shape.shape2D
Class TLcdLonLatFloatPoint
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.ALcdPoint
com.luciad.shape.shape2D.ALcd2DEditablePoint
com.luciad.shape.shape2D.TLcdLonLatFloatPoint
- All Implemented Interfaces:
ILcdBounded
,ILcdBounds
,ILcdPoint
,ILcdPointList
,ILcdPolypoint
,ILcdShape
,ILcd2DEditablePoint
,ILcd2DEditableShape
,ILcdCloneable
,Serializable
,Cloneable
This class provides an implementation of
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.
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdLonLatFloatPoint
(double aLongitude, double aLatitude) TLcdLonLatFloatPoint
(float aLongitude, float aLatitude) TLcdLonLatFloatPoint
(ILcdPoint aPoint) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of this object, by delegating toObject.clone()
.final ILcd2DEditableBounds
Returns a copy of thisILcdBounds
object that is also anILcd2DEditableBounds
.final ILcd2DEditablePoint
Returns a copy of thisILcdPoint
that is also anILcd2DEditablePoint
.final ILcd3DEditableBounds
Returns a copy of thisILcdBounds
object that is also anILcd3DEditableBounds
.final ILcd3DEditablePoint
Returns a copy of thisILcdPoint
that is also anILcd3DEditablePoint
.boolean
contains2D
(double aLon, double aLat) Checks whether thisALcdPoint
is equal to the given point in the 2D cartesian plane.boolean
contains2D
(double aLon, double aLat, double aWidth, double aHeight) Checks whether thisILcdBounds
object contains the given rectangle in the 2D space.final double
getCosX()
Returns cos(getX()
* DEG2RAD ).final double
getCosY()
Returns cos(getY()
* DEG2RAD ).final double
getSinX()
Returns sin(getX()
* DEG2RAD ).final double
getSinY()
Returns sin(getY()
* DEG2RAD ).final double
getTanX()
Returns tan(getX()
* DEG2RAD ).final double
getTanY()
Returns tan(getY()
* DEG2RAD ).final double
getX()
Returns the x coordinate of thisILcdPoint
.final double
getY()
Returns the y coordinate of thisILcdPoint
.final double
getZ()
Returns the z coordinate of thisILcdPoint
.boolean
interacts2D
(double aLon, double aLat, double aWidth, double aHeight) Checks whether thisILcdBounds
object interacts with the given rectangle in the 2D space.final void
move2D
(double aLon, double aLat) Moves thisILcd2DEditableShape
to the given point in the 2D space.toString()
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditablePoint
move2D, translate2D
Methods inherited from class com.luciad.shape.ALcdPoint
contains2D, contains3D, contains3D, contains3D, equals, getBounds, getDepth, getFocusPoint, getHeight, getLocation, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getPoint, getPointCount, getWidth, hashCode, interacts2D, interacts3D, interacts3D, isDefined
Methods inherited from class com.luciad.shape.ALcdShape
contains2D, contains3D, fromDomainObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape
move2D, translate2D
Methods inherited from interface com.luciad.shape.ILcdBounded
getBounds
Methods inherited from interface com.luciad.shape.ILcdBounds
getCenter
Methods inherited from interface com.luciad.shape.ILcdPointList
getPointSFCT, getX, getY, getZ
Methods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains3D, contains3D, getFocusPoint
-
Constructor Details
-
TLcdLonLatFloatPoint
public TLcdLonLatFloatPoint() -
TLcdLonLatFloatPoint
public TLcdLonLatFloatPoint(float aLongitude, float aLatitude) -
TLcdLonLatFloatPoint
public TLcdLonLatFloatPoint(double aLongitude, double aLatitude) -
TLcdLonLatFloatPoint
-
-
Method Details
-
getX
public final double getX()Description copied from interface:ILcdPoint
Returns the x coordinate of thisILcdPoint
. -
getY
public final double getY()Description copied from interface:ILcdPoint
Returns the y coordinate of thisILcdPoint
. -
getZ
public final double getZ()Description copied from interface:ILcdPoint
Returns the z coordinate of thisILcdPoint
.- Specified by:
getZ
in interfaceILcdPoint
- Overrides:
getZ
in classALcd2DEditablePoint
- Returns:
- 0.
-
getCosX
public final double getCosX()Description copied from interface:ILcdPoint
Returns cos(getX()
* DEG2RAD ). -
getCosY
public final double getCosY()Description copied from interface:ILcdPoint
Returns cos(getY()
* DEG2RAD ). -
getSinX
public final double getSinX()Description copied from interface:ILcdPoint
Returns sin(getX()
* DEG2RAD ). -
getSinY
public final double getSinY()Description copied from interface:ILcdPoint
Returns sin(getY()
* DEG2RAD ). -
getTanX
public final double getTanX()Description copied from interface:ILcdPoint
Returns tan(getX()
* DEG2RAD ). -
getTanY
public final double getTanY()Description copied from interface:ILcdPoint
Returns tan(getY()
* DEG2RAD ). -
cloneAs2DEditablePoint
Description copied from interface:ILcdPoint
Returns a copy of thisILcdPoint
that is also anILcd2DEditablePoint
. This makes sure that the first two dimensions of the copy are writable,- Specified by:
cloneAs2DEditablePoint
in interfaceILcdPoint
- Returns:
- a copy of this
ILcdPoint
that is also anILcd2DEditablePoint
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdPoint
object may be read-only. - See Also:
-
cloneAs3DEditablePoint
Description copied from interface:ILcdPoint
Returns a copy of thisILcdPoint
that is also anILcd3DEditablePoint
. This makes sure that all three dimensions of the copy are writable,- Specified by:
cloneAs3DEditablePoint
in interfaceILcdPoint
- Returns:
- a copy of this
ILcdPoint
that is also anILcd3DEditablePoint
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdPoint
object may be read-only. - See Also:
-
move2D
public final void move2D(double aLon, double aLat) Description copied from interface:ILcd2DEditableShape
Moves thisILcd2DEditableShape
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 theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
aLon
- the x coordinate of the point.aLat
- the y coordinate of the point.
-
contains2D
public boolean contains2D(double aLon, double aLat) Description copied from class:ALcdPoint
Checks whether thisALcdPoint
is equal to the given point in the 2D cartesian plane.- Specified by:
contains2D
in interfaceILcdShape
- Overrides:
contains2D
in classALcdPoint
- Parameters:
aLon
- the x coordinate of the point.aLat
- the y coordinate of the point.- Returns:
- the boolean result of the equality test.
-
interacts2D
public boolean interacts2D(double aLon, double aLat, double aWidth, double aHeight) Description copied from interface:ILcdBounds
Checks whether thisILcdBounds
object interacts with the given rectangle in the 2D space. Only the first two dimensions of theILcdBounds
object are considered.If this bounds is
undefined
, the result is false.- Specified by:
interacts2D
in interfaceILcdBounds
- Overrides:
interacts2D
in classALcdPoint
- Parameters:
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.- Returns:
true
if thisILcdBounds
object touches or overlaps to any extent with the given rectangle,false
otherwise.
-
contains2D
public boolean contains2D(double aLon, double aLat, double aWidth, double aHeight) Description copied from interface:ILcdBounds
Checks whether thisILcdBounds
object contains the given rectangle in the 2D space. Only the first two dimensions of theILcdBounds
object are considered.If this bounds is
undefined
, the result is false.- Specified by:
contains2D
in interfaceILcdBounds
- Overrides:
contains2D
in classALcdPoint
- Parameters:
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.- Returns:
- the boolean result of the containment test.
-
cloneAs2DEditableBounds
Description copied from interface:ILcdBounds
Returns a copy of thisILcdBounds
object that is also anILcd2DEditableBounds
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only.- Specified by:
cloneAs2DEditableBounds
in interfaceILcdBounds
- Returns:
- a copy of this
ILcdBounds
object that is also anILcd2DEditableBounds
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only. - See Also:
-
cloneAs3DEditableBounds
Description copied from interface:ILcdBounds
Returns a copy of thisILcdBounds
object that is also anILcd3DEditableBounds
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only.- Specified by:
cloneAs3DEditableBounds
in interfaceILcdBounds
- Returns:
- a copy of this
ILcdBounds
object that is also anILcd3DEditableBounds
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only. - See Also:
-
toString
- Overrides:
toString
in classALcd2DEditablePoint
-
clone
Description copied from class:ALcdShape
Creates and returns a copy of this object, by delegating toObject.clone()
. Extensions should delegate to this implementation withsuper.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.- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classALcdShape
- See Also:
-