Package com.luciad.shape
Class TLcdShapeUtil
java.lang.Object
com.luciad.shape.TLcdShapeUtil
This class provides convenience methods for
ILcdShape
operations.- Since:
- 2021.0.04
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isSelfIntersectingCartesian
(ILcdPointList aPointList) Use this method to check if aILcdPointList
has intersecting edges connecting its points.static boolean
isSelfIntersectingCartesian
(ILcdShapeList aShapeList) Use this method to check if aILcdShapeList
has self-intersectingILcdPointList
.static boolean
isSelfIntersectingEllipsoidal
(ILcdPointList aPointList, ILcdEllipsoid aEllipsoid) Use this method to check if aILcdPointList
has self-intersecting edges connecting its points.static boolean
isSelfIntersectingEllipsoidal
(ILcdShapeList aShapeList, ILcdEllipsoid aEllipsoid) Use this method to check if aILcdShapeList
has self-intersectingILcdPointList
.static TLcdRoundedPolygon
round
(ILcdModelReference aModelReference, ILcdPolygon aPolygon, double aRoundnessFactor) Use this method to create a rounded version of aILcdPolygon
.static TLcdRoundedPolyline
round
(ILcdModelReference aModelReference, ILcdPolyline aPolyline, double aRoundnessFactor) Use this method to create a rounded version of aILcdPolyline
.
-
Method Details
-
round
public static TLcdRoundedPolyline round(ILcdModelReference aModelReference, ILcdPolyline aPolyline, double aRoundnessFactor) Use this method to create a rounded version of a
ILcdPolyline
.This method creates a
TLcdRoundedPolyline
using the points contained in the givenILcdPolyline
as control points.- Parameters:
aModelReference
- The coordinate reference of thepoints
in the givenILcdPolyline
. ThisILcdModelReference
must not benull
. The rounding expects a geodetic polyline for geodetic references, and a linear polyline for other references.aPolyline
- TheILcdPolyline
whose points will be used as control points when creating the resultingTLcdRoundedPolyline
. Modifying theILcdPolyline
will modifyTLcdRoundedPolyline
after callingTLcdRoundedPolyline.invalidateObject()
. ThisILcdPolyline
must not benull
.aRoundnessFactor
- A number in the range [0.0, 1.0] indicating the roundness of the resulting curve.
A value of 0.0 indicates no roundness, in which case the resulting curve will use straight lines (i.e. it will look identical to the givenaPolyline
).
A value of 1.0 indicates maximum roundness.- Returns:
- A
TLcdRoundedPolyline
that is a rounded version of the givenILcdPolyline
. - See Also:
-
round
public static TLcdRoundedPolygon round(ILcdModelReference aModelReference, ILcdPolygon aPolygon, double aRoundnessFactor) Use this method to create a rounded version of a
ILcdPolygon
.This method creates a
TLcdRoundedPolygon
using the points contained in the givenILcdPolygon
as control points.- Parameters:
aModelReference
- The coordinate reference of thepoints
in the givenILcdPolygon
. ThisILcdModelReference
must not benull
. The rounding expects a geodetic polyline for geodetic references, and a linear polyline for other references.aPolygon
- TheILcdPolygon
whose points will be used as control points when creating the resultingTLcdRoundedPolygon
. Modifying theILcdPolygon
will modify theTLcdRoundedPolyline
after callingTLcdRoundedPolygon.invalidateObject()
. ThisILcdPolygon
must not benull
.aRoundnessFactor
- A number in the range [0.0, 1.0] indicating the roundness of the resulting curve.
A value of 0.0 indicates no roundness, in which case the resulting curve will use straight lines (i.e. it will look identical to the givenaPolygon
).
A value of 1.0 indicates maximum roundness.- Returns:
- A
TLcdRoundedPolygon
that is a rounded version of the givenILcdPolygon
. - See Also:
-
isSelfIntersectingEllipsoidal
public static boolean isSelfIntersectingEllipsoidal(ILcdPointList aPointList, ILcdEllipsoid aEllipsoid) Use this method to check if a
ILcdPointList
has self-intersecting edges connecting its points.- Parameters:
aPointList
- The pointlist containing the points to checkaEllipsoid
- The ellipsoid on which to compute the calculations- Returns:
- true if two of the implicit edges intersect, and therefore if the shape is self-intersecting
- Since:
- 2024.1
-
isSelfIntersectingEllipsoidal
public static boolean isSelfIntersectingEllipsoidal(ILcdShapeList aShapeList, ILcdEllipsoid aEllipsoid) Use this method to check if a
ILcdShapeList
has self-intersectingILcdPointList
.- Parameters:
aShapeList
- The shape list containing one or manyILcdPointList
aEllipsoid
- The ellipsoid on which to compute the calculations- Returns:
- true if one of the
ILcdPointList
s is self-intersecting - Since:
- 2024.1
-
isSelfIntersectingCartesian
Use this method to check if a
ILcdPointList
has intersecting edges connecting its points.- Parameters:
aPointList
- The pointlist containing the points to check- Returns:
- true if two of the implicit edges intersect, and therefore if the shape is self-intersecting
- Since:
- 2024.1
-
isSelfIntersectingCartesian
Use this method to check if a
ILcdShapeList
has self-intersectingILcdPointList
.- Parameters:
aShapeList
- The shape list containing one or manyILcdPointList
- Returns:
- true if one of the
ILcdPointList
s is self-intersecting - Since:
- 2024.1
-