public class TLcdGML31Point extends TLcdGML31AbstractGeometricPrimitive implements ILcd3DEditablePoint
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
GID_PROPERTY
Property that maps on the
gid attribute. |
static TLcdDataProperty |
POS_GROUP_PROPERTY
Data property that maps to the choice between the
pos and coordinates and coord elements. |
SRS_PROPERTY
DESCRIPTION_PROPERTY, ID_PROPERTY, META_DATA_PROPERTY_PROPERTY, NAME_PROPERTY
Constructor and Description |
---|
TLcdGML31Point() |
TLcdGML31Point(double aX,
double aY,
ILcdModelReference aSrs)
Constructs a point with the given parameters
|
TLcdGML31Point(ILcdModelReference aSrs)
Constructs a point and initializes its
model reference (srs).
|
TLcdGML31Point(TLcdDataType aType) |
TLcdGML31Point(TLcdDataType aDataType,
ILcdModelReference aSrs)
Constructs a point and initializes its
model reference (srs).
|
Modifier and Type | Method and Description |
---|---|
TLcdGML31Point |
clone()
Returns a deep clone of this object.
|
TLcdDataObject |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
ILcd2DEditablePoint |
cloneAs2DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd2DEditablePoint . |
ILcd3DEditablePoint |
cloneAs3DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd3DEditablePoint . |
boolean |
contains2D(double v,
double v1)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aILcdPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double v,
double v1,
double v2)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aILcdPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
double |
getCosX()
Returns cos(
getX() * DEG2RAD ). |
double |
getCosY()
Returns cos(
getY() * DEG2RAD ). |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
String |
getGid()
Gets the value of the
GID_PROPERTY property. |
ILcdDataObject |
getPosGroup()
Returns the value of the property that maps to the choice between the
pos and coordinates and coord elements. |
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 . |
void |
move2D(double v,
double v1)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move2D(ILcdPoint aILcdPoint)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move3D(double v,
double v1,
double v2)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
move3D(ILcdPoint aILcdPoint)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
setGid(String aValue)
Sets the value of the
GID_PROPERTY property. |
void |
setPosGroup(ILcdDataObject aValue)
Sets the value of the property that maps to the choice between the
pos and coordinates and coord elements. |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
String |
toString() |
void |
translate2D(double v,
double v1)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
void |
translate3D(double v,
double v1,
double v2)
Translates this
ILcd3DEditableShape from its current position over the given translation
vector in the 3D space. |
getSrs, setSrs
getDescription, getId, getMetaDataProperty, getName, setDescription, setId
canSetFeature, getFeature, getFeature, getFeatureCount, getFeaturedDescriptor, setFeature, setFeature
getDataType, getValue, getValue, hasValue, hasValue, setValue
public static final TLcdDataProperty POS_GROUP_PROPERTY
pos
and coordinates
and coord
elements.
The possible values for this property are instances of
public static final TLcdDataProperty GID_PROPERTY
gid
attribute. Acceptable values for this property are instances of java.lang.String
.public TLcdGML31Point(TLcdDataType aType)
public TLcdGML31Point(ILcdModelReference aSrs)
aSrs
- the model reference for this objectTLcdGML31AbstractGeometry.setSrs(ILcdModelReference)
public TLcdGML31Point(double aX, double aY, ILcdModelReference aSrs)
aX
- the X (lon) coordinate of the point.aY
- the Y (lat) coordinate of the point.aSrs
- the model reference for this objectTLcdGML31AbstractGeometry.setSrs(ILcdModelReference)
public TLcdGML31Point(TLcdDataType aDataType, ILcdModelReference aSrs)
aDataType
- the data type for this objectaSrs
- the model reference for this objectTLcdGML31AbstractGeometry.setSrs(ILcdModelReference)
public TLcdGML31Point()
public double getX()
ILcdPoint
ILcdPoint
.public double getY()
ILcdPoint
ILcdPoint
.public double getZ()
ILcdPoint
ILcdPoint
.public double getCosX()
ILcdPoint
getX()
* DEG2RAD ).public double getCosY()
ILcdPoint
getY()
* DEG2RAD ).public double getSinX()
ILcdPoint
getX()
* DEG2RAD ).public double getSinY()
ILcdPoint
getY()
* DEG2RAD ).public double getTanX()
ILcdPoint
getX()
* DEG2RAD ).public double getTanY()
ILcdPoint
getY()
* DEG2RAD ).public TLcdGML31Point clone()
TLcdDataObject
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdDataObject clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdDataObject
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.public 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 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 void move3D(ILcdPoint aILcdPoint)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
aILcdPoint
- the ILcdPoint
to move to.ILcd3DEditableShape.move3D(double, double, double)
public void move3D(double v, double v1, double v2)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
v
- the x coordinate of the point.v1
- the y coordinate of the point.v2
- the z coordinate of the point.public void translate3D(double v, double v1, double v2)
ILcd3DEditableShape
ILcd3DEditableShape
from its current position over the given translation
vector in the 3D space.translate3D
in interface ILcd3DEditableShape
v
- the x coordinate of the translation vector.v1
- the y coordinate of the translation vector.v2
- the z coordinate of the translation vector.public void move2D(ILcdPoint aILcdPoint)
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
and the ILcdPoint
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aILcdPoint
- the ILcdPoint
to move to.ILcd2DEditableShape.move2D(double, double)
public void move2D(double v, double v1)
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
v
- the x coordinate of the point.v1
- the y coordinate of the point.public void translate2D(double v, double v1)
ILcd2DEditableShape
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditableShape
v
- the x coordinate of the translation vector.v1
- the y coordinate of the translation vector.public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdGML31AbstractGeometry
ILcdShape
.public boolean contains2D(ILcdPoint aILcdPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
contains2D
in class TLcdGML31AbstractGeometry
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains2D(double v, double v1)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
contains2D
in class TLcdGML31AbstractGeometry
v
- the x coordinate of the point.v1
- the y coordinate of the point.public boolean contains3D(ILcdPoint aILcdPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdGML31AbstractGeometry
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public boolean contains3D(double v, double v1, double v2)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdGML31AbstractGeometry
v
- the x coordinate of the point.v1
- the y coordinate of the point.v2
- the z coordinate of the point.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
getBounds
in class TLcdGML31AbstractGeometry
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public String toString()
toString
in class TLcdGML31AbstractGeometry
public ILcdDataObject getPosGroup()
pos
and coordinates
and coord
elements.
The possible values for this property are instances of
POS_GROUP_PROPERTY
property.public void setPosGroup(ILcdDataObject aValue)
pos
and coordinates
and coord
elements.
The possible values for this property are instances of
aValue
- the value to set for the POS_GROUP_PROPERTY
property.public String getGid()
GID_PROPERTY
property.
This attribute is included for backward compatibility with GML 2 and is deprecated with GML 3. This identifer is superceded by "gml:id" inherited from AbstractGMLType. The attribute "gid" should not be used anymore and may be deleted in future versions of GML without further notice.
GID_PROPERTY
property.public void setGid(String aValue)
GID_PROPERTY
property.
This attribute is included for backward compatibility with GML 2 and is deprecated with GML 3. This identifer is superceded by "gml:id" inherited from AbstractGMLType. The attribute "gid" should not be used anymore and may be deleted in future versions of GML without further notice.
aValue
- the value to set for the GID_PROPERTY
property.