Class TLcdSphericalBasicBinaryTopology
java.lang.Object
com.luciad.geometry.topology.ALcd2DBasicBinaryTopology
com.luciad.geometry.topology.ALcd2DBasicBinaryTopologyMultiShape
com.luciad.geometry.topology.spherical.TLcdSphericalBasicBinaryTopology
- All Implemented Interfaces:
ILcd2DBinaryTopology
,ILcd2DLineIntersectionTopology
public class TLcdSphericalBasicBinaryTopology
extends ALcd2DBasicBinaryTopologyMultiShape
implements ILcd2DBinaryTopology, ILcd2DLineIntersectionTopology
Implementation of
ILcd2DBinaryTopology
and
ILcd2DLineIntersectionTopology
on a spherical model
of the earth. Instances of ILcdShape
aS1
and
ILcdShape
aS2
are expected to be defined on
a sphere (or spheroid).
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:
- 1.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
ConstructorDescriptionConstructor for the TLcdSphericalBasicBinaryTopology object.TLcdSphericalBasicBinaryTopology
(double aRadius) Constructor for the TLcdSphericalBasicBinaryTopology 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 radius (meters) attribute of the TLcdSphericalBasicBinaryTopology object.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
setFallBackOnBoundsWithBounds
(boolean aFallBack) Sets the fallBackOnBoundsWithBounds attribute of theALcd2DBasicBinaryTopologyMultiShape
object.void
setRadius
(double aRadius) Sets the radius (meters) attribute of the TLcdSphericalBasicBinaryTopology object.Methods inherited from class com.luciad.geometry.topology.ALcd2DBasicBinaryTopologyMultiShape
isTraceOn, setClassTraceOn
Methods inherited from class com.luciad.geometry.topology.ALcd2DBasicBinaryTopology
symRel
-
Constructor Details
-
TLcdSphericalBasicBinaryTopology
public TLcdSphericalBasicBinaryTopology()Constructor for the TLcdSphericalBasicBinaryTopology object. -
TLcdSphericalBasicBinaryTopology
public TLcdSphericalBasicBinaryTopology(double aRadius) Constructor for the TLcdSphericalBasicBinaryTopology object.- Parameters:
aRadius
- radius of the earth, specified in meters.
-
-
Method Details
-
setRadius
public void setRadius(double aRadius) Sets the radius (meters) attribute of the TLcdSphericalBasicBinaryTopology object.- Parameters:
aRadius
- The new radius value (meters).- See Also:
-
getRadius
public double getRadius()Gets the radius (meters) attribute of the TLcdSphericalBasicBinaryTopology object.- Returns:
- The radius 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.
-