Class TLcdSurface

java.lang.Object
com.luciad.shape.ALcdShape
com.luciad.shape.TLcdSurface
All Implemented Interfaces:
ILcdBounded, ILcdEditableSurface, ILcdShape, ILcdSurface, ILcdCache, ILcdCloneable, Serializable, Cloneable

public class TLcdSurface extends ALcdShape implements ILcdEditableSurface, ILcdCache
This class provides an implementation of ILcdEditableSurface.

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.

Since:
9.0
See Also:
  • Constructor Details

    • TLcdSurface

      public TLcdSurface()
  • Method Details

    • getFocusPoint

      public ILcdPoint getFocusPoint()
      Description copied from interface: ILcdShape
      Returns the focus point of this ILcdShape.
      Specified by:
      getFocusPoint in interface ILcdShape
      Returns:
      the focus point of this ILcdShape.
    • contains2D

      public boolean contains2D(double aX, double aY)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given point in the 2D space. Only the first two dimensions of the ILcdShape are considered.
      Specified by:
      contains2D in interface ILcdShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • contains3D

      public boolean contains3D(double aX, double aY, double aZ)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given point in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • getBounds

      public ILcdBounds getBounds()
      Description copied from interface: ILcdBounded
      Returns the 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.

      Specified by:
      getBounds in interface ILcdBounded
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    • setExteriorRing

      public void setExteriorRing(ILcdRing aRing)
      Description copied from interface: ILcdEditableSurface
      Sets the exterior boundary of this surface.

      Note that this implementations may throw a ClassCastException or IllegalArgumentException in case the class of the ring is not compatible with the implementation of the surface. Implementations should specify in their documentation all restrictions that apply in this context.

      Specified by:
      setExteriorRing in interface ILcdEditableSurface
      Parameters:
      aRing - the exterior boundary of this surface.
    • getExteriorRing

      public ILcdRing getExteriorRing()
      Description copied from interface: ILcdSurface
      Returns the exterior boundary of this surface.
      Specified by:
      getExteriorRing in interface ILcdSurface
      Returns:
      the exterior boundary of this surface.
    • getInteriorRings

      public List<ILcdRing> getInteriorRings()
      Description copied from interface: ILcdEditableSurface
      Returns the holes in this surface, as a list of ILcdRing instances. If there are no holes, an empty list is returned.

      The returned list is editable and can be used to add, remove or replace interior rings.

      Specified by:
      getInteriorRings in interface ILcdEditableSurface
      Specified by:
      getInteriorRings in interface ILcdSurface
      Returns:
      an editable list containing zero or more rings, representing the holes in this surface.
    • 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:
    • equals

      public boolean equals(Object aObject)
      Description copied from class: ALcdShape
      An object is considered equal to this shape if it has the same class. Extensions should refine this comparison, based on their properties.
      Overrides:
      equals in class ALcdShape
    • 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 ALcdShape
    • insertIntoCache

      public void insertIntoCache(Object aKey, Object aObject)
      Description copied from interface: ILcdCache
      Inserts a cache Object corresponding to the given key Object.
      Specified by:
      insertIntoCache in interface ILcdCache
      Parameters:
      aKey - the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself: insertIntoCache(this, ...).
      aObject - the Object to be cached.
    • getCachedObject

      public Object getCachedObject(Object aKey)
      Description copied from interface: ILcdCache
      Looks up and returns the cached Object corresponding to the given key.
      Specified by:
      getCachedObject in interface ILcdCache
      Parameters:
      aKey - the key Object that was used for storing the cache Object.
      Returns:
      the cached Object, or null if there is no Object corresponding to the given key.
    • removeCachedObject

      public Object removeCachedObject(Object aKey)
      Description copied from interface: ILcdCache
      Looks up and removes the cached Object corresponding to the given key.
      Specified by:
      removeCachedObject in interface ILcdCache
      Parameters:
      aKey - the key Object that was used for storing the cache Object.
      Returns:
      the cached Object, or null if there was no Object corresponding to the given key.
    • clearCache

      public void clearCache()
      Description copied from interface: ILcdCache
      Clears the cache.
      Specified by:
      clearCache in interface ILcdCache