Package com.luciad.geometries
Class Patch
java.lang.Object
com.luciad.geometries.Geometry
com.luciad.geometries.Surface
com.luciad.geometries.Patch
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
contains2D
(Coordinate point) Returns if this patch contains the given point.protected void
finalize()
Returns the basering
geometry on which the patch is based.Methods inherited from class com.luciad.geometries.Geometry
getBounds, getReference
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classSurface
-
getBaseGeometry
Returns the basering
geometry on which the patch is based.- Returns:
- the base
ring
geometry on which the patch is based.
-
contains2D
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:
- Currently, this function doesn't support patches with a
CompositeRing
as base geometry. In that case, an exception is thrown. - For patches with
PolylineRing
base geometries, a spherical approximation is used. - For patches with geodetic
PolylineRing
base geometries,LineInterpolationType#Linear
is not supported.
- Parameters:
point
- a point, defined in the same reference as the reference of thisPatch
- Returns:
- whether this patch contains the given point.
- Throws:
IllegalArgumentException
- when calling this function on a patch with a geodeticPolylineRing
base geometry with linear interpolation.- Since:
- 2025.0
- Currently, this function doesn't support patches with a
-