public class TLcdSphericalBasicBinaryTopology extends ALcd2DBasicBinaryTopologyMultiShape implementsILcd2DBasicBinaryTopology, ILcd2DLineIntersectionTopology
ILcd2DBasicBinaryTopology
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:
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.fBTCircleCircle, fBTDefault, fBTPolygonCircle, fBTPolygonPolygon, fBTPolygonPolyline, fBTPolygonPolypoint, fBTPolylineCircle, fBTPolylinePolyline, fBTPolylinePolypoint, fBTPolypointCircle, fBTPolypointPolypoint, fBTShapeBounds, fBTShapePoint, fBTSRSR
CONTAIN, INSIDE, INTERACT, LINE_INTERSECT
Constructor and Description |
---|
TLcdSphericalBasicBinaryTopology()
Constructor for the TLcdSphericalBasicBinaryTopology object.
|
TLcdSphericalBasicBinaryTopology(double aRadius)
Constructor for the TLcdSphericalBasicBinaryTopology object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkTopology(ILcdShape aS1,
ILcdShape aS2,
int aRel)
If no implementation is found for the object pair
(aS1,aS2) an
IllegalArgumentException is thrown except if the method
isFallBackOnBoundsWithBounds returns true . |
double |
getRadius()
Gets the radius (meters) attribute of the TLcdSphericalBasicBinaryTopology object.
|
boolean |
isFallBackOnBoundsWithBounds()
Gets the fallBackOnBoundsWithBounds attribute of the
ALcd2DBasicBinaryTopologyMultiShape object.
|
ILcdPoint[] |
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 the
ALcd2DBasicBinaryTopologyMultiShape object. |
void |
setRadius(double aRadius)
Sets the radius (meters) attribute of the TLcdSphericalBasicBinaryTopology object.
|
isTraceOn, setClassTraceOn
symRel
public TLcdSphericalBasicBinaryTopology()
public TLcdSphericalBasicBinaryTopology(double aRadius)
aRadius
- radius of the earth, specified in meters.public void setRadius(double aRadius)
aRadius
- The new radius value (meters).getRadius()
public double getRadius()
setRadius(double)
public void setFallBackOnBoundsWithBounds(boolean aFallBack)
ALcd2DBasicBinaryTopologyMultiShape
ALcd2DBasicBinaryTopologyMultiShape
object.setFallBackOnBoundsWithBounds
in class ALcd2DBasicBinaryTopologyMultiShape
aFallBack
- The new fallBackOnBoundsWithBounds value.public boolean isFallBackOnBoundsWithBounds()
ALcd2DBasicBinaryTopologyMultiShape
isFallBackOnBoundsWithBounds
in class ALcd2DBasicBinaryTopologyMultiShape
public boolean checkTopology(ILcdShape aS1, ILcdShape aS2, int aRel) throws IllegalArgumentException
ALcd2DBasicBinaryTopologyMultiShape
(aS1,aS2)
an
IllegalArgumentException
is thrown except if the method
isFallBackOnBoundsWithBounds
returns true .checkTopology
in interface ILcd2DBinaryTopology
checkTopology
in class ALcd2DBasicBinaryTopologyMultiShape
aS1
- first shapeaS2
- second shapeaRel
- a relation to be checked uponaRelation
holds between
the two shapes.IllegalArgumentException
- if no specific implementation is known for
the two shapes, that is, when the combination of the two
given shapes is not supported.public ILcdPoint[] lineIntersection(ILcdShape aS1, ILcdShape aS2)
ILcd2DLineIntersectionTopology
Note that the order of the intersection points might be unexpected.
lineIntersection
in interface ILcd2DLineIntersectionTopology
aS1
- The first shape.aS2
- The second shape.null
is returned.public int lineIntersectionSFCT(ILcdShape aS1, ILcdShape aS2, ILcd2DEditablePoint[] aPointsSFCT)
ILcd2DLineIntersectionTopology
Note that the order of the intersection points might be unexpected.
lineIntersectionSFCT
in interface ILcd2DLineIntersectionTopology
aS1
- The first shape.aS2
- The second shape.aPointsSFCT
- The array of points in which the results should be stored.-1
is returned.