Class TLcdSphericalConstructiveGeometry

java.lang.Object
com.luciad.geometry.constructive.spherical.TLcdSphericalConstructiveGeometry
All Implemented Interfaces:
ILcdConstructiveGeometry

public class TLcdSphericalConstructiveGeometry extends Object implements ILcdConstructiveGeometry
ILcdConstructiveGeometry implementation for spherical topology. This implementation supports the following shapes:
  • ILcdPoint
  • ILcdPolypoint
  • ILcdPolyline
  • ILcdPolygon
  • ILcdComplexPolygon
  • ILcdShapeList
  • ILcdSurface (Outer and inner rings must be instances of ILcdPolygon)
  • TLcdXYGeoBuffer
  • TLcdLonLatGeoBuffer
  • TLcdLonLatHeightVariableGeoBuffer
  • TLcdLonLatBuffer
  • TLcdLonLatHeightBuffer

Depending on the type of input shapes and the interaction of the input shapes, the output can be any of the following shapes or an ILcdShapeList containing the following shapes:

  • ILcdPoint
  • ILcdPolyline
  • ILcdPolygon
  • ILcdComplexPolygon
  • ILcdShapeList
Since:
10.1
  • Constructor Details

    • TLcdSphericalConstructiveGeometry

      public TLcdSphericalConstructiveGeometry(double aRadius, double aTolerance)

      Creates a new TLcdSphericalConstructiveGeometry.

      The tolerance allows the calculation to treat nearby points of the two different shapes, as if they are coincident. If the tolerance is too large, incorrect results can occur. The calculations are most stable if the tolerance is smaller than the length of the smallest line segment.

      Parameters:
      aRadius - The radius of the sphere on which the geometry is defined, in meters.
      aTolerance - The tolerance in which points are considered equal, in meters.
  • Method Details

    • union

      public ILcdShape union(ILcdShape... aShapes)
      Description copied from interface: ILcdConstructiveGeometry
      Calculates the union of the given shapes. The resulting shape contains all points that are contained in any of the given shapes. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Union
      Red and blue shapes are the input shapes. The green shape is the result.

      Specified by:
      union in interface ILcdConstructiveGeometry
      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the union of the input shapes
    • intersection

      public ILcdShape intersection(ILcdShape... aShapes)
      Description copied from interface: ILcdConstructiveGeometry
      Calculates the intersection of the given shapes. The resulting shape only contains points that are contained in all of the given shapes. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Intersection
      Red and blue shapes are the input shapes. The green shape is the result.

      Specified by:
      intersection in interface ILcdConstructiveGeometry
      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the intersection of the input shapes
    • difference

      public ILcdShape difference(ILcdShape... aShapes)
      Description copied from interface: ILcdConstructiveGeometry
      Calculates the difference of the given shapes. All next shapes are subtracted from the first shape. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Difference
      Red and blue shapes are the input shapes. The green shape is the result.

      Specified by:
      difference in interface ILcdConstructiveGeometry
      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the difference of the input shapes
    • symmetricDifference

      public ILcdShape symmetricDifference(ILcdShape... aShapes)
      Description copied from interface: ILcdConstructiveGeometry
      Calculates the symmetric difference of the given shapes. The resulting shape contains all points that are inside an odd amount of the input shapes. This can be compared to the XOR boolean operation. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Symmetric difference
      Red and blue shapes are the input shapes. The green shape is the result.

      Specified by:
      symmetricDifference in interface ILcdConstructiveGeometry
      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the symmetric difference of the input shapes
    • convexHull

      public ILcdShape convexHull(ILcdShape... aShapes)
      Description copied from interface: ILcdConstructiveGeometry
      Finds the convex hull of the given shape or shapes. The convex hull is defined as the smallest convex polygon that contains the shapes. If multiple shapes are given, the result is the convex hull around the points of all shapes together.

      Convex hull
      Convex hull of the United Kingdom.

      Specified by:
      convexHull in interface ILcdConstructiveGeometry
      Parameters:
      aShapes - the shape or shapes for which to find the convex hull.
      Returns:
      a shape representing the convex hull as a polygon.