Class TLcdS57Point

All Implemented Interfaces:
ILcdDataObject, ILcdS57FeatureObject, ILcdS57Object, ILcdBounded, ILcdBounds, ILcdPoint, ILcdPointList, ILcdPolypoint, ILcdShape, ILcd2DEditablePoint, ILcd2DEditableShape, ILcdCloneable, ILcdFeatured, Serializable, Cloneable
Direct Known Subclasses:
TLcdS57SoundingPoint

public class TLcdS57Point extends ALcd2DEditablePoint implements ILcdS57Object, ILcdDataObject, ILcdFeatured, Serializable
Represents a Point feature in the S-57 domain model.
See Also:
  • Constructor Details

    • TLcdS57Point

      public TLcdS57Point(double aLon, double aLat)
      Deprecated.
      Use the constructor with TLcdS57Node instead.
      Creates a new S-57 Point feature.
      Parameters:
      aLon - the longitude coordinate of this Point feature.
      aLat - the latitude coordinate of this Point feature.
    • TLcdS57Point

      public TLcdS57Point(TLcdS57FeatureObject aFeatureObject, double aLon, double aLat)
      Deprecated.
      Use the constructor with TLcdS57Node instead.
      Creates a new S-57 Point feature with the specified properties.
      Parameters:
      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.
    • TLcdS57Point

      public TLcdS57Point(TLcdS57FeatureObject aFeatureObject, TLcdS57Node aNode)
      Creates a new S-57 Point feature with the specified properties.
      Parameters:
      aFeatureObject - the S-57 feature object describing the object class and attributes of this Point feature.
      aNode - the geographical location of this point.
  • Method Details

    • getNode

      public TLcdS57Node getNode()
      Returns the node containing the geographical location of this point.
      Returns:
      the node containing the geographical location of this point.
    • setOnFloatingPlatform

      public void setOnFloatingPlatform(boolean aIsOnFloatingPlatform)
      Specifies whether the point is on a floating platform (only applicable for TOPMAR points). This flag can be used to determine its symbolization (e.g. in the S-52 TOPMAR procedure).

      The onFloatingPlatform property is part of the set of preprocessor variables.

      Parameters:
      aIsOnFloatingPlatform - indicates whether the point is on a floating platform (only applicable for TOPMAR points).
      See Also:
    • isOnFloatingPlatform

      public boolean isOnFloatingPlatform()
      Returns whether the point is on a floating platform (only applicable for TOPMAR points). This flag can be used to determine its symbolization (e.g. in the S-52 TOPMAR procedure).

      The onFloatingPlatform property is part of the set of preprocessor variables.

      Returns:
      true if the point is on a floating platform, false otherwise.
      See Also:
    • setOtherLightsAtSameLocation

      public void setOtherLightsAtSameLocation(boolean aHasOtherLightsAtSameLocation)
      Specifies whether the point has other lights at the same location (only applicable for LIGHTS objects). This flag can be used to determine its symbolization (e.g. in the S-52 LIGHTS procedure).

      The otherLightsAtSameLocation property is part of the set of preprocessor variables.

      Parameters:
      aHasOtherLightsAtSameLocation - indicates whether the point has other lights at the same location.
      See Also:
    • hasOtherLightsAtSameLocation

      public boolean hasOtherLightsAtSameLocation()
      Returns whether the point has other lights at the same location (only applicable for LIGHTS objects). This flag can be used to determine its symbolization (e.g. in the S-52 LIGHTS procedure).

      The otherLightsAtSameLocation property is part of the set of preprocessor variables.

      Returns:
      true if the point has other lights at the same location, false otherwise.
      See Also:
    • setAnyNoSectorLightsAtSameLocation

      public void setAnyNoSectorLightsAtSameLocation(boolean aHasAnyNoSectorLightsAtSameLocation)
      Specifies whether the point has any 'No sector'-lights at the same location (only applicable for LIGHTS objects). This flag can be used to determine its symbolization (e.g. in the S-52 LIGHTS procedure).

      The anyNoSectorLightsAtSameLocation property is part of the set of preprocessor variables.

      Parameters:
      aHasAnyNoSectorLightsAtSameLocation - indicates whether the point has any 'No sector'-lights at the same location.
      See Also:
    • hasAnyNoSectorLightsAtSameLocation

      public boolean hasAnyNoSectorLightsAtSameLocation()
      Returns whether the point has any 'No sector'-lights at the same location (only applicable for LIGHTS objects). This flag can be used to determine its symbolization (e.g. in the S-52 LIGHTS procedure).

      The anyNoSectorLightsAtSameLocation property is part of the set of preprocessor variables.

      Returns:
      true if the point has any 'No sector'-lights at the same location, false otherwise.
      See Also:
    • setLargerOverlappingLightSectorsAtSameLocation

      public 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). This flag can be used to determine its symbolization (e.g. in the S-52 LIGHTS procedure).

      The largerOverlappingLightSectorsAtSameLocation property is part of the set of preprocessor variables.

      Parameters:
      aHasLargerOverlappingLightSectorsAtSameLocation - indicates whether the point has other overlapping light sectors at the same location, which are larger than its own sector.
      See Also:
    • hasLargerOverlappingLightSectorsAtSameLocation

      public 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). This flag can be used to determine its symbolization (e.g. in the S-52 LIGHTS procedure).

      The largerOverlappingLightSectorsAtSameLocation property is part of the set of preprocessor variables.

      Returns:
      true if the point has other overlapping light sectors at the same location, which are larger than its own sector, false otherwise.
      See Also:
    • setMinimumDepth

      public 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). The depths are retrieved from the DRVAL1 attribute, if specified. The minimum value can be used as a default depth value (e.g. in the S-52 DEPVAL procedure).

      The minimumDepth property is part of the set of preprocessor variables.

      Parameters:
      aMinimumDepth - the minimum depth of this point and of containing and intersecting DEPARE and DRGARE objects.
      See Also:
    • getMinimumDepth

      public 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). The depths are retrieved from the DRVAL1 attribute, if specified. The minimum value can be used as a default depth value (e.g. in the S-52 DEPVAL procedure).

      The minimumDepth property is part of the set of preprocessor variables.

      Returns:
      the minimum depth of this point and of containing and intersecting DEPARE and DRGARE objects.
      See Also:
    • setMaximumDepth

      public 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). The depths are retrieved from the DRVAL1 attribute, if specified. The maximum value can be used to determine whether the point is an isolated danger (e.g. in the S-52 UDWHAZ procedure).

      The maximumDepth property is part of the set of preprocessor variables.

      Parameters:
      aMaximumDepth - the maximum depth of this point and of containing DEPARE and DRGARE objects.
      See Also:
    • getMaximumDepth

      public float getMaximumDepth()
      Returns the maximum depth of this point and of containing DEPARE and DRGARE objects (only applicable for OBSTRN, UWTROC, and WRECK points). The depths are retrieved from the DRVAL1 attribute, if specified. The maximum value can be used to determine whether the point is an isolated danger (e.g. in the S-52 UDWHAZ procedure).

      The maximumDepth property is part of the set of preprocessor variables.

      Returns:
      the maximum depth of this point and of containing DEPARE and DRGARE objects.
      See Also:
    • getLowestFnctnm

      public int getLowestFnctnm()
      Returns the lowest "fnctnm" (Function of notice mark) value of overlapping "notmrk" (Notice mark) objects. Returns -1 if there is only one notmrk at the given location.
      Returns:
      The value
      Since:
      2018.0
    • setLowestFnctnm

      public void setLowestFnctnm(int aLowestFnctnm)
      Sets the lowest "fnctnm" (Function of notice mark) value of overlapping "notmrk" (Notice mark) objects.
      Parameters:
      aLowestFnctnm - The new value
      Since:
      2018.0
    • setIdentifier

      public void setIdentifier(ILcdS57Identifier aIdentifier)
    • setGroup

      public void setGroup(int aGroup)
    • setRelationships

      public void setRelationships(ILcdS57Relationship[] aRelationships)
    • getIdentifier

      public ILcdS57Identifier getIdentifier()
      Description copied from interface: ILcdS57FeatureObject
      Gets the identifier of this shape.
      Specified by:
      getIdentifier in interface ILcdS57FeatureObject
    • getGroup

      public int getGroup()
      Description copied from interface: ILcdS57FeatureObject
      Returns the group to which the S-57 object belongs, this can be 1 (= skin of the earth) or 2 (= all other objects).
      Specified by:
      getGroup in interface ILcdS57FeatureObject
      Returns:
      the group to which the S-57 object belongs
    • getShape

      public int getShape()
      Description copied from interface: ILcdS57FeatureObject
      Gets the type of the shape: POINT, LINE, AREA or NONE.
      Specified by:
      getShape in interface ILcdS57FeatureObject
    • getRelationshipCount

      public int getRelationshipCount()
      Description copied from interface: ILcdS57FeatureObject
      Returns the number of relationships in which this S-57 object is involved.
      Specified by:
      getRelationshipCount in interface ILcdS57FeatureObject
      Returns:
      the number of relationships in which this S-57 object is involved.
    • getRelationship

      public ILcdS57Relationship getRelationship(int aIndex)
      Description copied from interface: ILcdS57FeatureObject
      Returns the relationship at index aIndex.
      Specified by:
      getRelationship in interface ILcdS57FeatureObject
      Parameters:
      aIndex - index of the relationship to return
      Returns:
      the relationship at the specified position.
    • move2D

      public void move2D(double aX, double aY)
      Description copied from interface: ILcd2DEditableShape
      Moves this 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.
      Specified by:
      move2D in interface ILcd2DEditableShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
    • getX

      public double getX()
      Description copied from interface: ILcdPoint
      Returns the x coordinate of this ILcdPoint.
      Specified by:
      getX in interface ILcdPoint
      Returns:
      the x coordinate of this ILcdPoint.
    • getY

      public double getY()
      Description copied from interface: ILcdPoint
      Returns the y coordinate of this ILcdPoint.
      Specified by:
      getY in interface ILcdPoint
      Returns:
      the y coordinate of this ILcdPoint.
    • cloneAs2DEditablePoint

      public ILcd2DEditablePoint cloneAs2DEditablePoint()
      Description copied from interface: ILcdPoint
      Returns a copy of this ILcdPoint that is also an ILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable,
      Specified by:
      cloneAs2DEditablePoint in interface ILcdPoint
      Returns:
      a copy of this 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.
      See Also:
    • cloneAs3DEditablePoint

      public ILcd3DEditablePoint cloneAs3DEditablePoint()
      Description copied from interface: ILcdPoint
      Returns a copy of this ILcdPoint that is also an ILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable,
      Specified by:
      cloneAs3DEditablePoint in interface ILcdPoint
      Returns:
      a copy of this 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.
      See Also:
    • cloneAs2DEditableBounds

      public ILcd2DEditableBounds cloneAs2DEditableBounds()
      Description copied from interface: ILcdBounds
      Returns a copy of this 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.
      Specified by:
      cloneAs2DEditableBounds in interface ILcdBounds
      Returns:
      a copy of this 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.
      See Also:
    • cloneAs3DEditableBounds

      public ILcd3DEditableBounds cloneAs3DEditableBounds()
      Description copied from interface: ILcdBounds
      Returns a copy of this 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.
      Specified by:
      cloneAs3DEditableBounds in interface ILcdBounds
      Returns:
      a copy of this 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.
      See Also:
    • interacts2D

      public boolean interacts2D(double aLon, double aLat, double aWidth, double aHeight)
      Description copied from interface: ILcdBounds
      Checks whether this 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.

      Specified by:
      interacts2D in interface ILcdBounds
      Overrides:
      interacts2D in class ALcdPoint
      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 this ILcdBounds object touches or overlaps to any extent with the given rectangle, false otherwise.
    • getDataType

      public TLcdDataType getDataType()
      Description copied from interface: ILcdDataObject
      Returns the type of this data object. This can never be null.
      Specified by:
      getDataType in interface ILcdDataObject
      Returns:
      the type of this data object
    • getValue

      public Object getValue(TLcdDataProperty aProperty)
      Description copied from interface: 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.

      Specified by:
      getValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which the value is to be returned
      Returns:
      the value of the given property for this data object
    • getValue

      public Object getValue(String aPropertyName)
      Description copied from interface: 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).

      See ILcdDataObject.getValue(TLcdDataProperty) for more information.

      Specified by:
      getValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property of which the value is to be returned
      Returns:
      the value of the property with the given name
      See Also:
    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aValue)
      Description copied from interface: 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 the data 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.

      Specified by:
      setValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which the value is to be set
      aValue - the value to set
      See Also:
    • setValue

      public void setValue(String aPropertyName, Object aValue)
      Description copied from interface: 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).

      See ILcdDataObject.setValue(TLcdDataProperty, Object) for more information.

      Specified by:
      setValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property of which the value is to be set
      aValue - the value to set
    • hasValue

      public boolean hasValue(TLcdDataProperty aProperty)
      Description copied from interface: ILcdDataObject
      Indicates whether this data object has a value for the given property.

      • 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 IllegalArgumentException
      • aProperty is null: not allowed, you will get NullPointerException

      A multivalued property is considered to have a value if it has at least one value.

      Specified by:
      hasValue in interface ILcdDataObject
      Parameters:
      aProperty - the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the given property, false otherwise.
    • hasValue

      public boolean hasValue(String aPropertyName)
      Description copied from interface: ILcdDataObject
      Indicates whether this data object has a value for the given property.
      See ILcdDataObject.hasValue(TLcdDataProperty) for more information.
      Specified by:
      hasValue in interface ILcdDataObject
      Parameters:
      aPropertyName - the name of the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the property with the given name, false otherwise.
    • canSetFeature

      public boolean canSetFeature(int aIndex)
      Description copied from interface: ILcdFeatured
      Checks whether the specified feature is editable.
      Specified by:
      canSetFeature in interface ILcdFeatured
      Parameters:
      aIndex - a valid feature index.
      Returns:
      true if the feature can be set, false otherwise.
    • getFeature

      public Object getFeature(int aIndex) throws IndexOutOfBoundsException
      Description copied from interface: ILcdFeatured
      Returns the feature Object at the given index.
      Specified by:
      getFeature in interface ILcdFeatured
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the feature Object at the given index.
      Throws:
      IndexOutOfBoundsException - when an index is chosen greater than the result of getFeatureCount.
      See Also:
    • getFeatureCount

      public int getFeatureCount()
      Description copied from interface: ILcdFeatured
      Returns the number of features.
      Specified by:
      getFeatureCount in interface ILcdFeatured
      Returns:
      the number of features.
    • setFeature

      public void setFeature(int aIndex, Object aFeature) throws IllegalArgumentException
      Description copied from interface: ILcdFeatured
      Sets the feature Object at the given index.
      Specified by:
      setFeature in interface ILcdFeatured
      Parameters:
      aIndex - a valid feature index.
      aFeature - the new feature Object.
      Throws:
      IllegalArgumentException - if the feature can't be set.
      See Also:
    • equals

      public boolean equals(Object o)
      Description copied from class: ALcdPoint
      Returns whether the given object has the same class and the same coordinates.
      Specified by:
      equals in interface ILcdPoint
      Overrides:
      equals in class ALcdPoint
      Parameters:
      o - the Object to compare to.
      Returns:
      false if aObject is an ILcdPoint object with different 3D coordinates or the object is not an ILcdPoint. If the objects do have the same 3D coordinates, the return value is defined by the specific implementations of ILcdPoint and may still be false.
    • hashCode

      public int hashCode()
      Description copied from class: ALcdShape
      The hash code of this shape is the hash code of its class, in order to be consistent with the ALcdShape.equals(Object) method. Extensions should refine this implementation, based on their properties.
      Overrides:
      hashCode in class ALcdPoint
    • clone

      public Object clone()
      Description copied from class: ALcdShape
      Creates and returns a copy of this object, by delegating to 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.
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class ALcdShape
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class ALcd2DEditablePoint