Class TLcdEllipsoidalBasicBinaryTopology
java.lang.Object
com.luciad.geometry.topology.ALcd2DBasicBinaryTopology
com.luciad.geometry.topology.ALcd2DBasicBinaryTopologyMultiShape
com.luciad.geometry.topology.ellipsoidal.TLcdEllipsoidalBasicBinaryTopology
- All Implemented Interfaces:
ILcd2DEllipsoidalBinaryTopology
,ILcd2DBinaryTopology
,ILcd2DLineIntersectionTopology
public class TLcdEllipsoidalBasicBinaryTopology
extends ALcd2DBasicBinaryTopologyMultiShape
implements ILcd2DEllipsoidalBinaryTopology, ILcd2DLineIntersectionTopology
Implementation of
ILcd2DBinaryTopology
and
ILcd2DLineIntersectionTopology
on an ellipsoidal
model of the earth. Instances of ILcdShape
aS1
and
ILcdShape
aS2
are expected to be defined on an
ellipsoid. Most sub-algorithms use approximate calculations, hence the need
for the absolute and relative tolerances (see ILcd2DEllipsoidalBinaryTopology
).
This implementation knows about specific implementations for:
- ILcdPolygon - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdPolyline - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdPolypoint - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdCircle - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdCircleBy3Points - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdEllipse - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdArc - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdArcBand - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdCircularArcByCenterPoint - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdCircularArcByBulge - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdCircularArcBy3Points - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdGeoBuffer - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdVariableGeoBuffer - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- TLcdLonLatBuffer - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds
- ILcdBounds, - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, TLcdLonLatBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdComplexPolygon - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdBounds, ILcdComplexPolygon
- ILcdCompositeCurve - with - ILcdCompositeCurve, ILcdShape : each of the ILcdCurve elements of the ILcdCompositeCurve and the ILcdShape should be an implementation of the ILcdShapes mentioned above
- ILcdRing - with - ILcdRing, ILcdShape : each of the ILcdCurve elements of the ILcdRing and the ILcdShape should be an implementation of the ILcdShapes mentioned above
- ILcdShapeList - with - ILcdShapeList, ILcdShape : each of the ILcdShape elements of the ILcdShapeList should be an implementation of the ILcdShapes mentioned above
ILcdGeoBuffer
objects, support is only provided if the base shape
of the buffer is of the type ILcdPolyline
.
In case no specific implementation is known the behavior depends on the
return value of the method isFallBackOnBoundsWithBounds
:
if true the bounds of the ILcdShape objects are compared, otherwise
a IllegalArgumentException
is thrown.- Since:
- 2.0
-
Field Summary
Fields inherited from class com.luciad.geometry.topology.ALcd2DBasicBinaryTopologyMultiShape
fBTCircleCircle, fBTDefault, fBTPolygonCircle, fBTPolygonPolygon, fBTPolygonPolyline, fBTPolygonPolypoint, fBTPolylineCircle, fBTPolylinePolyline, fBTPolylinePolypoint, fBTPolypointCircle, fBTPolypointPolypoint, fBTShapeBounds, fBTShapePoint, fBTSRSR
Fields inherited from interface com.luciad.geometry.topology.ILcd2DBinaryTopology
CONTAIN, INSIDE, INTERACT, LINE_INTERSECT
-
Constructor Summary
ConstructorDescriptionDefault constructor for the TLcdEllipsoidalBasicBinaryTopology object.TLcdEllipsoidalBasicBinaryTopology
(ILcdEllipsoid aEllipsoid) Constructor for the TLcdEllipsoidalBasicBinaryTopology object.TLcdEllipsoidalBasicBinaryTopology
(ILcdEllipsoid aEllipsoid, double aRelativeTolerance, double aAbsoluteTolerance) Constructor for the TLcdEllipsoidalBasicBinaryTopology object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkTopology
(ILcdShape aS1, ILcdShape aS2, int aRel) If no implementation is found for the object pair(aS1,aS2)
anIllegalArgumentException
is thrown except if the methodisFallBackOnBoundsWithBounds
returns true .double
Gets the absolute tolerance (meters) used for approximations.Get the ellipsoid on which the calculations are performed.double
Gets the relative tolerance used for approximations.boolean
Gets the fallBackOnBoundsWithBounds attribute of the ALcd2DBasicBinaryTopologyMultiShape object.lineIntersection
(ILcdShape aS1, ILcdShape aS2) Calculates the intersection points in 2D between the outlines of the given shapes.int
lineIntersectionSFCT
(ILcdShape aS1, ILcdShape aS2, ILcd2DEditablePoint[] aPointsSFCT) Calculates the intersection points in 2D between the outlines of the given shapes.void
setAbsoluteTolerance
(double aAbsoluteTolerance) Sets the absolute tolerance (meters) to be used for approximations.void
setEllipsoid
(ILcdEllipsoid aEllipsoid) Set the ellipsoid on which to perform the calculations.void
setFallBackOnBoundsWithBounds
(boolean aFallBack) Sets the fallBackOnBoundsWithBounds attribute of theALcd2DBasicBinaryTopologyMultiShape
object.void
setRelativeTolerance
(double aRelativeTolerance) Sets the relative tolerance to be used for approximations.Methods inherited from class com.luciad.geometry.topology.ALcd2DBasicBinaryTopologyMultiShape
isTraceOn, setClassTraceOn
Methods inherited from class com.luciad.geometry.topology.ALcd2DBasicBinaryTopology
symRel
-
Constructor Details
-
TLcdEllipsoidalBasicBinaryTopology
public TLcdEllipsoidalBasicBinaryTopology()Default constructor for the TLcdEllipsoidalBasicBinaryTopology object. Uses a defaultILcdEllipsoid
object corresponding to theILcdEllipsoid
from the WGS84 geodetic datum. -
TLcdEllipsoidalBasicBinaryTopology
Constructor for the TLcdEllipsoidalBasicBinaryTopology object.- Parameters:
aEllipsoid
- ellipsoid representing the earth.
-
TLcdEllipsoidalBasicBinaryTopology
public TLcdEllipsoidalBasicBinaryTopology(ILcdEllipsoid aEllipsoid, double aRelativeTolerance, double aAbsoluteTolerance) Constructor for the TLcdEllipsoidalBasicBinaryTopology object.- Parameters:
aEllipsoid
- ellipsoid representing the earth.aRelativeTolerance
- relative tolerance to be used for approximations.aAbsoluteTolerance
- absolute tolerance to be used for approximations, expressed in meters.- See Also:
-
-
Method Details
-
setEllipsoid
Description copied from interface:ILcd2DEllipsoidalBinaryTopology
Set the ellipsoid on which to perform the calculations.- Specified by:
setEllipsoid
in interfaceILcd2DEllipsoidalBinaryTopology
- Parameters:
aEllipsoid
- The new ellipsoid value.- See Also:
-
setRelativeTolerance
public void setRelativeTolerance(double aRelativeTolerance) Description copied from interface:ILcd2DEllipsoidalBinaryTopology
Sets the relative tolerance to be used for approximations.- Specified by:
setRelativeTolerance
in interfaceILcd2DEllipsoidalBinaryTopology
- Parameters:
aRelativeTolerance
- The new relativeTolerance value.- See Also:
-
setAbsoluteTolerance
public void setAbsoluteTolerance(double aAbsoluteTolerance) Description copied from interface:ILcd2DEllipsoidalBinaryTopology
Sets the absolute tolerance (meters) to be used for approximations.- Specified by:
setAbsoluteTolerance
in interfaceILcd2DEllipsoidalBinaryTopology
- Parameters:
aAbsoluteTolerance
- The new absoluteTolerance value (meters).- See Also:
-
getEllipsoid
Description copied from interface:ILcd2DEllipsoidalBinaryTopology
Get the ellipsoid on which the calculations are performed.- Specified by:
getEllipsoid
in interfaceILcd2DEllipsoidalBinaryTopology
- Returns:
- The ellipsoid value.
- See Also:
-
getRelativeTolerance
public double getRelativeTolerance()Description copied from interface:ILcd2DEllipsoidalBinaryTopology
Gets the relative tolerance used for approximations.- Specified by:
getRelativeTolerance
in interfaceILcd2DEllipsoidalBinaryTopology
- Returns:
- The relativeTolerance value.
- See Also:
-
getAbsoluteTolerance
public double getAbsoluteTolerance()Description copied from interface:ILcd2DEllipsoidalBinaryTopology
Gets the absolute tolerance (meters) used for approximations.- Specified by:
getAbsoluteTolerance
in interfaceILcd2DEllipsoidalBinaryTopology
- Returns:
- The absoluteTolerance value (meters).
- See Also:
-
setFallBackOnBoundsWithBounds
public void setFallBackOnBoundsWithBounds(boolean aFallBack) Description copied from class:ALcd2DBasicBinaryTopologyMultiShape
Sets the fallBackOnBoundsWithBounds attribute of theALcd2DBasicBinaryTopologyMultiShape
object.- Overrides:
setFallBackOnBoundsWithBounds
in classALcd2DBasicBinaryTopologyMultiShape
- Parameters:
aFallBack
- The new fallBackOnBoundsWithBounds value.
-
isFallBackOnBoundsWithBounds
public boolean isFallBackOnBoundsWithBounds()Description copied from class:ALcd2DBasicBinaryTopologyMultiShape
Gets the fallBackOnBoundsWithBounds attribute of the ALcd2DBasicBinaryTopologyMultiShape object.- Overrides:
isFallBackOnBoundsWithBounds
in classALcd2DBasicBinaryTopologyMultiShape
- Returns:
- The fallBackOnBoundsWithBounds value.
-
checkTopology
public boolean checkTopology(ILcdShape aS1, ILcdShape aS2, int aRel) throws IllegalArgumentException Description copied from class:ALcd2DBasicBinaryTopologyMultiShape
If no implementation is found for the object pair(aS1,aS2)
anIllegalArgumentException
is thrown except if the methodisFallBackOnBoundsWithBounds
returns true .- Specified by:
checkTopology
in interfaceILcd2DBinaryTopology
- Overrides:
checkTopology
in classALcd2DBasicBinaryTopologyMultiShape
- Parameters:
aS1
- first shapeaS2
- second shapeaRel
- a relation to be checked upon- Returns:
- whether the relation
aRelation
holds between the two shapes. - Throws:
IllegalArgumentException
- if no specific implementation is known for the two shapes, that is, when the combination of the two given shapes is not supported.
-
lineIntersection
Description copied from interface:ILcd2DLineIntersectionTopology
Calculates the intersection points in 2D between the outlines of the given shapes.Note that the order of the intersection points might be unexpected.
- Specified by:
lineIntersection
in interfaceILcd2DLineIntersectionTopology
- Parameters:
aS1
- The first shape.aS2
- The second shape.- Returns:
- If both shapes intersect, an array of zero length if no intersection points were found
(e.g., two overlapping circles) or an array containing the intersection points otherwise.
If no intersection is found,
null
is returned.
-
lineIntersectionSFCT
Description copied from interface:ILcd2DLineIntersectionTopology
Calculates the intersection points in 2D between the outlines of the given shapes. The result is filled in the given point array. The number of intersection points is returned as an integer.Note that the order of the intersection points might be unexpected.
- Specified by:
lineIntersectionSFCT
in interfaceILcd2DLineIntersectionTopology
- Parameters:
aS1
- The first shape.aS2
- The second shape.aPointsSFCT
- The array of points in which the results should be stored.- Returns:
- If both shapes intersect, the number of intersection points that were found
(>= 0; e.g., 0 for two overlapping circles).
If no intersection is found,
-1
is returned.
-