public class TLcdS57Point extends ALcd2DEditablePoint implements ILcdS57Object, ILcdDataObject,ILcdFeatured, Serializable
AREA, LINE, NONE, POINT
Constructor and Description |
---|
TLcdS57Point(double aLon,
double aLat)
Deprecated.
Use the constructor with
TLcdS57Node instead. |
TLcdS57Point(TLcdS57FeatureObject aFeatureObject,
double aLon,
double aLat)
Deprecated.
Use the constructor with
TLcdS57Node instead. |
TLcdS57Point(TLcdS57FeatureObject aFeatureObject,
TLcdS57Node aNode)
Creates a new S-57 Point feature with the specified properties.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSetFeature(int aIndex)
Checks whether the specified feature is editable.
|
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 |
equals(Object o)
Returns whether the given object has the same class and the same
coordinates.
|
TLcdDataType |
getDataType()
Returns the type of this data object.
|
Object |
getFeature(int aIndex)
Returns the feature
Object at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
int |
getGroup()
Returns the group to which the S-57 object belongs, this can be 1 (= skin of the earth)
or 2 (= all other objects).
|
ILcdS57Identifier |
getIdentifier()
Gets the identifier of this shape.
|
int |
getLowestFnctnm()
Returns the lowest "fnctnm" (Function of notice mark) value of overlapping "notmrk" (Notice mark) objects.
|
float |
getMaximumDepth()
Returns the maximum depth of this point and of containing DEPARE and DRGARE objects (only
applicable for OBSTRN, UWTROC, and WRECK points).
|
float |
getMinimumDepth()
Returns the minimum depth of this point and of containing and intersecting DEPARE and DRGARE
objects (only applicable for OBSTRN, UWTROC, and WRECK points).
|
TLcdS57Node |
getNode()
Returns the node containing the geographical location of this point.
|
ILcdS57Relationship |
getRelationship(int aIndex)
Returns the relationship at index
aIndex . |
int |
getRelationshipCount()
Returns the number of relationships in which this S-57 object is involved.
|
int |
getShape()
Gets the type of the shape:
POINT , LINE , AREA or
NONE . |
Object |
getValue(String aPropertyName)
Convenience method that returns the value of the property with the given name.
|
Object |
getValue(TLcdDataProperty aProperty)
Returns the value of the given property.
|
double |
getX()
Returns the x coordinate of this
ILcdPoint . |
double |
getY()
Returns the y coordinate of this
ILcdPoint . |
boolean |
hasAnyNoSectorLightsAtSameLocation()
Returns whether the point has any 'No sector'-lights at the same location (only applicable for
LIGHTS objects).
|
int |
hashCode()
The hash code of this shape is the hash code of its class, in order to
be consistent with the
ALcdShape.equals(Object) method. |
boolean |
hasLargerOverlappingLightSectorsAtSameLocation()
Returns whether the point has other overlapping light sectors at the same location, which are
larger than its own sector (only applicable for LIGHTS objects).
|
boolean |
hasOtherLightsAtSameLocation()
Returns whether the point has other lights at the same location (only applicable for LIGHTS
objects).
|
boolean |
hasValue(String aPropertyName)
Indicates whether this data object has a value for the given property.
|
boolean |
hasValue(TLcdDataProperty aProperty)
Indicates whether this data object has a value for the given property.
|
boolean |
interacts2D(double aLon,
double aLat,
double aWidth,
double aHeight)
Checks whether this
ILcdBounds object interacts with the given rectangle in
the 2D space. |
boolean |
isOnFloatingPlatform()
Returns whether the point is on a floating platform (only applicable for TOPMAR points).
|
void |
move2D(double aX,
double aY)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
setAnyNoSectorLightsAtSameLocation(boolean aHasAnyNoSectorLightsAtSameLocation)
Specifies whether the point has any 'No sector'-lights at the same location (only applicable
for LIGHTS objects).
|
void |
setFeature(int aIndex,
Object aFeature)
Sets the feature
Object at the given index. |
void |
setGroup(int aGroup)
Sets the group to which the S-57 object belongs, this can be 1 (= skin of the earth) or 2 (=
all other objects).
|
void |
setIdentifier(ILcdS57Identifier aIdentifier)
Set the identifier of this object.
|
void |
setLargerOverlappingLightSectorsAtSameLocation(boolean aHasLargerOverlappingLightSectorsAtSameLocation)
Specifies whether the point has other overlapping light sectors at the same location, which
are
larger than its own sector (only applicable for LIGHTS objects).
|
void |
setLowestFnctnm(int aLowestFnctnm)
Sets the lowest "fnctnm" (Function of notice mark) value of overlapping "notmrk" (Notice mark) objects.
|
void |
setMaximumDepth(float aMaximumDepth)
Sets the maximum depth of this point and of containing DEPARE and DRGARE objects (only
applicable for OBSTRN, UWTROC, and WRECK points).
|
void |
setMinimumDepth(float aMinimumDepth)
Sets the minimum depth of this point and of containing and intersecting DEPARE and DRGARE
objects (only applicable for OBSTRN, UWTROC, and WRECK points).
|
void |
setOnFloatingPlatform(boolean aIsOnFloatingPlatform)
Specifies whether the point is on a floating platform (only applicable for TOPMAR points).
|
void |
setOtherLightsAtSameLocation(boolean aHasOtherLightsAtSameLocation)
Specifies whether the point has other lights at the same location (only applicable for LIGHTS
objects).
|
void |
setRelationships(ILcdS57Relationship[] aRelationships)
Sets the relationships in which this S-57 object is involved.
|
void |
setValue(String aPropertyName,
Object aValue)
Convenience method that sets the value of the property with the given name.
|
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
String |
toString() |
getZ, move2D, translate2D
contains2D, contains2D, contains2D, contains3D, contains3D, contains3D, getBounds, getCosX, getCosY, getDepth, getFocusPoint, getHeight, getLocation, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getPoint, getPointCount, getSinX, getSinY, getTanX, getTanY, getWidth, interacts2D, interacts3D, interacts3D, isDefined
contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
getCosX, getCosY, getSinX, getSinY, getTanX, getTanY
getPointSFCT, getX, getY, getZ
getCenter
public TLcdS57Point(double aLon, double aLat)
TLcdS57Node
instead.aLon
- the longitude coordinate of this Point feature.aLat
- the latitude coordinate of this Point feature.public TLcdS57Point(TLcdS57FeatureObject aFeatureObject, double aLon, double aLat)
TLcdS57Node
instead.aFeatureObject
- the S-57 feature object describing the object class and
attributes of this Point feature.aLon
- the longitude coordinate of this Point feature.aLat
- the latitude coordinate of this Point feature.public TLcdS57Point(TLcdS57FeatureObject aFeatureObject, TLcdS57Node aNode)
aFeatureObject
- the S-57 feature object describing the object class and
attributes of this Point feature.aNode
- the geographical location of this point.public TLcdS57Node getNode()
public void setOnFloatingPlatform(boolean aIsOnFloatingPlatform)
onFloatingPlatform
property is part of the set of preprocessor variables.aIsOnFloatingPlatform
- indicates whether the point is on a floating platform (only
applicable for TOPMAR points).isOnFloatingPlatform()
,
TLcdS57Preprocessor
public boolean isOnFloatingPlatform()
onFloatingPlatform
property is part of the set of preprocessor variables.true
if the point is on a floating platform, false
otherwise.setOnFloatingPlatform(boolean)
,
TLcdS57Preprocessor
public void setOtherLightsAtSameLocation(boolean aHasOtherLightsAtSameLocation)
otherLightsAtSameLocation
property is part of the set of preprocessor variables.aHasOtherLightsAtSameLocation
- indicates whether the point has other lights at the same
location.hasOtherLightsAtSameLocation()
,
TLcdS57Preprocessor
public boolean hasOtherLightsAtSameLocation()
otherLightsAtSameLocation
property is part of the set of preprocessor variables.true
if the point has other lights at the same location, false
otherwise.setOtherLightsAtSameLocation(boolean)
,
TLcdS57Preprocessor
public void setAnyNoSectorLightsAtSameLocation(boolean aHasAnyNoSectorLightsAtSameLocation)
anyNoSectorLightsAtSameLocation
property is part of the set of preprocessor
variables.aHasAnyNoSectorLightsAtSameLocation
- indicates whether the point has any 'No sector'-lights at the same location.hasAnyNoSectorLightsAtSameLocation()
,
TLcdS57Preprocessor
public boolean hasAnyNoSectorLightsAtSameLocation()
anyNoSectorLightsAtSameLocation
property is part of the set of preprocessor
variables.true
if the point has any 'No sector'-lights at the same location, false
otherwise.setAnyNoSectorLightsAtSameLocation(boolean)
,
TLcdS57Preprocessor
public void setLargerOverlappingLightSectorsAtSameLocation(boolean aHasLargerOverlappingLightSectorsAtSameLocation)
largerOverlappingLightSectorsAtSameLocation
property is part of the set of
preprocessor variables.aHasLargerOverlappingLightSectorsAtSameLocation
- indicates whether the point has other overlapping light sectors at the same location,
which are larger than its own sector.hasLargerOverlappingLightSectorsAtSameLocation()
,
TLcdS57Preprocessor
public boolean hasLargerOverlappingLightSectorsAtSameLocation()
largerOverlappingLightSectorsAtSameLocation
property is part of the set of
preprocessor variables.true
if the point has other overlapping light sectors at the same location,
which are larger than its own sector, false
otherwise.setLargerOverlappingLightSectorsAtSameLocation(boolean)
,
TLcdS57Preprocessor
public void setMinimumDepth(float aMinimumDepth)
minimumDepth
property is part of the set of preprocessor variables.aMinimumDepth
- the minimum depth of this point and of containing and intersecting DEPARE
and DRGARE objects.getMinimumDepth()
,
TLcdS57Preprocessor
public float getMinimumDepth()
minimumDepth
property is part of the set of preprocessor variables.setMinimumDepth(float)
,
TLcdS57Preprocessor
public void setMaximumDepth(float aMaximumDepth)
maximumDepth
property is part of the set of preprocessor variables.aMaximumDepth
- the maximum depth of this point and of containing DEPARE and DRGARE
objects.getMaximumDepth()
,
TLcdS57Preprocessor
public float getMaximumDepth()
maximumDepth
property is part of the set of preprocessor variables.setMaximumDepth(float)
,
TLcdS57Preprocessor
public int getLowestFnctnm()
public void setLowestFnctnm(int aLowestFnctnm)
aLowestFnctnm
- The new valuepublic void setIdentifier(ILcdS57Identifier aIdentifier)
aIdentifier
- the S-57 identifier to be set on this object.public void setGroup(int aGroup)
public void setRelationships(ILcdS57Relationship[] aRelationships)
relationship.getFirstObject() == this || relationship.getSecondObject() == thisIf this object is not involved in any relationship, this method should be called with argument
null
.aRelationships
- the array of relationships in which this object is involed.public ILcdS57Identifier getIdentifier()
ILcdS57FeatureObject
getIdentifier
in interface ILcdS57FeatureObject
public int getGroup()
ILcdS57FeatureObject
getGroup
in interface ILcdS57FeatureObject
public int getShape()
ILcdS57FeatureObject
POINT
, LINE
, AREA
or
NONE
.getShape
in interface ILcdS57FeatureObject
public int getRelationshipCount()
ILcdS57FeatureObject
getRelationshipCount
in interface ILcdS57FeatureObject
public ILcdS57Relationship getRelationship(int aIndex)
ILcdS57FeatureObject
aIndex
.getRelationship
in interface ILcdS57FeatureObject
aIndex
- index of the relationship to returnpublic void move2D(double aX, double aY)
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
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public double getX()
ILcdPoint
ILcdPoint
.public double getY()
ILcdPoint
ILcdPoint
.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 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 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 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 TLcdDataType getDataType()
ILcdDataObject
null
.getDataType
in interface ILcdDataObject
public Object getValue(TLcdDataProperty aProperty)
ILcdDataObject
Returns the value of the given property.
If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).
The property must not be null, and must be declared in the data object's type
or in one of its super types.
Otherwise an IllegalArgumentException
is thrown.
getValue
in interface ILcdDataObject
aProperty
- the property for which the value is to be returnedpublic Object getValue(String aPropertyName)
ILcdDataObject
Convenience method that returns the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.getValue(TLcdDataProperty)
for more information.getValue
in interface ILcdDataObject
aPropertyName
- the name of the property of which the value is to be returnedTLcdDataType.getProperty(String)
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
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public void setValue(String aPropertyName, Object aValue)
ILcdDataObject
Convenience method that sets the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.setValue(TLcdDataProperty, Object)
for more information.setValue
in interface ILcdDataObject
aPropertyName
- the name of the property of which the value is to be setaValue
- the value to setpublic boolean hasValue(TLcdDataProperty aProperty)
ILcdDataObject
aProperty
is from the right data type
, and this instance has a value for it: returns true
aProperty
is from the right data type
, and this instance has no value for it: returns false
aProperty
is not from the right data type
: not allowed, you will get IllegalArgumentExceptionaProperty
is null
: not allowed, you will get NullPointerExceptionhasValue
in interface ILcdDataObject
aProperty
- the property for which to return whether a value is present or not.true
if this data object has a value for the given property, false
otherwise.public boolean hasValue(String aPropertyName)
ILcdDataObject
ILcdDataObject.hasValue(TLcdDataProperty)
for more information.hasValue
in interface ILcdDataObject
aPropertyName
- the name of the property for which to return whether a value is present
or not.true
if this data object has a value for the property with the given name,
false
otherwise.public boolean canSetFeature(int aIndex)
ILcdFeatured
canSetFeature
in interface ILcdFeatured
aIndex
- a valid feature index.public Object getFeature(int aIndex) throws IndexOutOfBoundsException
ILcdFeatured
Object
at the given index.getFeature
in interface ILcdFeatured
aIndex
- a valid feature index.Object
at the given index.IndexOutOfBoundsException
- when an index is chosen greater than the result of getFeatureCount.ILcdFeatured.setFeature(int, java.lang.Object)
public int getFeatureCount()
ILcdFeatured
getFeatureCount
in interface ILcdFeatured
public void setFeature(int aIndex, Object aFeature) throws IllegalArgumentException
ILcdFeatured
Object
at the given index.setFeature
in interface ILcdFeatured
aIndex
- a valid feature index.aFeature
- the new feature Object
.IllegalArgumentException
- if the feature can't be set.ILcdFeatured.getFeature(int)
,
ILcdFeatured.canSetFeature(int)
public boolean equals(Object o)
ALcdPoint
equals
in interface ILcdPoint
equals
in class ALcdPoint
o
- the Object
to compare to.public int hashCode()
ALcdShape
ALcdShape.equals(Object)
method.
Extensions should refine this implementation, based on their properties.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()
public String toString()
toString
in class ALcd2DEditablePoint