Package com.luciad.shape.shape3D
Class TLcdLonLatHeightPoint
java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.ALcdPoint
com.luciad.shape.shape2D.ALcd2DEditablePoint
com.luciad.shape.shape3D.ALcd3DEditablePoint
com.luciad.shape.shape3D.TLcdLonLatHeightPoint
- All Implemented Interfaces:
ILcdBounded
,ILcdBounds
,ILcdPoint
,ILcdPointList
,ILcdPolypoint
,ILcdShape
,ILcd2DEditablePoint
,ILcd2DEditableShape
,ILcd3DEditablePoint
,ILcd3DEditableShape
,ILcdCloneable
,Serializable
,Cloneable
- Direct Known Subclasses:
TLcdASDITrack
,TLcdASTERIXTrack
,TLcdLonLatHeightMPoint
This class provides an implementation of
ILcd3DEditablePoint
in the geodetic space. This implementation caches the trigonometric function
values of the coordinates.
All longitude/latitude coordinates are expressed in degrees. Heights are expressed in meters.
This class is thread-safe for concurrent read-only access of its contents. For read-write access, external locking must be used. Such locking is typically done at the model level.
Use as a domain object
If you plan on usingTLcdLonLatHeightPoint
as a domain object (e.g. using ILcdModel.addElement),
please note that two TLcdLonLatHeightPoint
instances are considered to be equal if they describe
the same location. If location does not uniquely identify your domain objects, please override
equals
/hashcode
to take the additional properties into account.
Alternatively, one could consider every class instance different, resulting in these
equals
/hashcode
implementations:
public boolean equals( Object aObject ) {
return aObject == this;
}
public int hashCode() {
return System.identityHashCode( this );
}
Failing to respect equals/hashcode may result in undesired behavior, for example when performing
spatial queries, used during painting.- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdLonLatHeightPoint
(double aLon, double aLat, double aZ) Constructs a newTLcdLonLatHeightPoint
with the given coordinates.TLcdLonLatHeightPoint
(ILcdPoint aPoint) Constructs and initializes a newTLcdLonLatHeightPoint
with the same location as the givenILcdPoint
.TLcdLonLatHeightPoint
(ILcdPoint aPoint, double aZ) Constructs and initializes a newTLcdLonLatHeightPoint
at the given location. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of thisILcdBounds
object that is also anILcd2DEditableBounds
.Returns a copy of thisILcdPoint
that is also anILcd2DEditablePoint
.Returns a copy of thisILcdBounds
object that is also anILcd3DEditableBounds
.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.boolean
Checks whether the object has the same class as this object and whether the coordinates are equal or differ by 360 for longitudes.final double
getCosX()
Returns cos(getX()
* DEG2RAD ).final double
getCosY()
Returns cos(getY()
* DEG2RAD ).double
Caution:returns the height of the bounds of this point, which is 0.0.final double
getLat()
final double
getLon()
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.void
move3D
(double aLon, double aLat, double aZ) Sets the longitude and latitude of thisILcd3DEditablePoint
.Methods inherited from class com.luciad.shape.shape3D.ALcd3DEditablePoint
move2D, move3D, toString, translate3D
Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditablePoint
move2D, translate2D
Methods inherited from class com.luciad.shape.ALcdPoint
contains2D, contains3D, contains3D, contains3D, getBounds, getDepth, getFocusPoint, getLocation, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getPoint, getPointCount, getWidth, hashCode, interacts2D, interacts3D, interacts3D, isDefined
Methods inherited from class com.luciad.shape.ALcdShape
clone, 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, move2D, translate2D
Methods inherited from interface com.luciad.shape.shape3D.ILcd3DEditableShape
move3D, translate3D
Methods inherited from interface com.luciad.shape.ILcdBounded
getBounds
Methods inherited from interface com.luciad.shape.ILcdBounds
getCenter
Methods inherited from interface com.luciad.util.ILcdCloneable
clone
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
-
TLcdLonLatHeightPoint
public TLcdLonLatHeightPoint(double aLon, double aLat, double aZ) Constructs a newTLcdLonLatHeightPoint
with the given coordinates.- Parameters:
aLon
- longitude in decimal degrees, positive for Eastern hemisphere, negative for Western hemisphere.aLat
- latitude in decimal degrees, positive for Northern hemisphere, negative for Southern hemisphere.aZ
- z coordinate in meters.
-
TLcdLonLatHeightPoint
public TLcdLonLatHeightPoint() -
TLcdLonLatHeightPoint
Constructs and initializes a newTLcdLonLatHeightPoint
with the same location as the givenILcdPoint
.- Parameters:
aPoint
- the point to be copied.
-
TLcdLonLatHeightPoint
Constructs and initializes a newTLcdLonLatHeightPoint
at the given location.- Parameters:
aPoint
- the point to be copied of which the first two coordinates will be used.aZ
- the third coordinate.
-
-
Method Details
-
getLon
public final double getLon() -
getLat
public final double getLat() -
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.
-
getCosY
public final double getCosY()Description copied from interface:ILcdPoint
Returns cos(getY()
* DEG2RAD ). -
getCosX
public final double getCosX()Description copied from interface:ILcdPoint
Returns cos(getX()
* DEG2RAD ). -
getSinY
public final double getSinY()Description copied from interface:ILcdPoint
Returns sin(getY()
* DEG2RAD ). -
getSinX
public final double getSinX()Description copied from interface:ILcdPoint
Returns sin(getX()
* DEG2RAD ). -
getTanY
public final double getTanY()Description copied from interface:ILcdPoint
Returns tan(getY()
* DEG2RAD ). -
getTanX
public final double getTanX()Description copied from interface:ILcdPoint
Returns tan(getX()
* DEG2RAD ). -
move3D
public void move3D(double aLon, double aLat, double aZ) Sets the longitude and latitude of thisILcd3DEditablePoint
.- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aLon
- longitude in decimal degrees, positive for Eastern hemisphere, negative for Western hemisphere.aLat
- latitude in decimal degrees, positive for Northern hemisphere, negative for Southern hemisphere.aZ
- height in meters.
-
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) 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.
-
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.
-
equals
Checks whether the object has the same class as this object and whether the coordinates are equal or differ by 360 for longitudes. -
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:
-
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:
-
getHeight
public double getHeight()Caution:returns the height of the bounds of this point, which is 0.0. This method is not an alternative togetZ()
.- Specified by:
getHeight
in interfaceILcdBounds
- Overrides:
getHeight
in classALcdPoint
- Returns:
- 0.0.
- See Also:
-