Class Patch

All Implemented Interfaces:
AutoCloseable

public final class Patch extends Surface implements AutoCloseable
A patch is a surface based on a single ring, thus not having any holes.

You can read more about the available geometries here.

See Also:
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Surface
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class Surface
    • getBaseGeometry

      @NotNull public Ring getBaseGeometry()
      Returns the base ring geometry on which the patch is based.
      Returns:
      the base ring geometry on which the patch is based.
    • contains2D

      public boolean contains2D(@NotNull Coordinate point) throws IllegalArgumentException
      Returns if this patch contains the given point.

      For these calculations, the height value of the given point or base geometry is ignored. I.e. only the horizontal coordinates are taken into account.

      Limitations:

      Parameters:
      point - a point, defined in the same reference as the reference of this Patch
      Returns:
      whether this patch contains the given point.
      Throws:
      IllegalArgumentException - when calling this function on a patch with a geodetic PolylineRing base geometry with linear interpolation.
      Since:
      2025.0