public class TLcdEllipsoidalBasicBinaryTopology extends ALcd2DBasicBinaryTopologyMultiShape implements ILcd2DEllipsoidalBinaryTopology, ILcd2DLineIntersectionTopology
ILcd2DBasicBinaryTopology
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:
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 |
---|
TLcdEllipsoidalBasicBinaryTopology()
Default 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.
|
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 |
getAbsoluteTolerance()
Gets the absolute tolerance (meters) used for approximations.
|
ILcdEllipsoid |
getEllipsoid()
Get the ellipsoid on which the calculations are performed.
|
double |
getRelativeTolerance()
Gets the relative tolerance used for approximations.
|
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 |
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 the
ALcd2DBasicBinaryTopologyMultiShape object. |
void |
setRelativeTolerance(double aRelativeTolerance)
Sets the relative tolerance to be used for approximations.
|
isTraceOn, setClassTraceOn
symRel
public TLcdEllipsoidalBasicBinaryTopology()
ILcdEllipsoid
object corresponding to the
ILcdEllipsoid
from the WGS84 geodetic datum.public TLcdEllipsoidalBasicBinaryTopology(ILcdEllipsoid aEllipsoid)
aEllipsoid
- ellipsoid representing the earth.public TLcdEllipsoidalBasicBinaryTopology(ILcdEllipsoid aEllipsoid, double aRelativeTolerance, double aAbsoluteTolerance)
aEllipsoid
- ellipsoid representing the earth.aRelativeTolerance
- relative tolerance to be used for approximations.aAbsoluteTolerance
- absolute tolerance to be used for approximations,
expressed in meters.setRelativeTolerance(double)
,
setAbsoluteTolerance(double)
public void setEllipsoid(ILcdEllipsoid aEllipsoid)
ILcd2DEllipsoidalBinaryTopology
setEllipsoid
in interface ILcd2DEllipsoidalBinaryTopology
aEllipsoid
- The new ellipsoid value.ILcd2DEllipsoidalBinaryTopology.getEllipsoid()
public void setRelativeTolerance(double aRelativeTolerance)
ILcd2DEllipsoidalBinaryTopology
setRelativeTolerance
in interface ILcd2DEllipsoidalBinaryTopology
aRelativeTolerance
- The new relativeTolerance value.ILcd2DEllipsoidalBinaryTopology.getRelativeTolerance()
public void setAbsoluteTolerance(double aAbsoluteTolerance)
ILcd2DEllipsoidalBinaryTopology
setAbsoluteTolerance
in interface ILcd2DEllipsoidalBinaryTopology
aAbsoluteTolerance
- The new absoluteTolerance value (meters).ILcd2DEllipsoidalBinaryTopology.getAbsoluteTolerance()
public ILcdEllipsoid getEllipsoid()
ILcd2DEllipsoidalBinaryTopology
getEllipsoid
in interface ILcd2DEllipsoidalBinaryTopology
ILcd2DEllipsoidalBinaryTopology.setEllipsoid(com.luciad.geodesy.ILcdEllipsoid)
public double getRelativeTolerance()
ILcd2DEllipsoidalBinaryTopology
getRelativeTolerance
in interface ILcd2DEllipsoidalBinaryTopology
ILcd2DEllipsoidalBinaryTopology.setRelativeTolerance(double)
public double getAbsoluteTolerance()
ILcd2DEllipsoidalBinaryTopology
getAbsoluteTolerance
in interface ILcd2DEllipsoidalBinaryTopology
ILcd2DEllipsoidalBinaryTopology.setAbsoluteTolerance(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.