Package org.locationtech.jtstest.geomop
Class BufferValidatedGeometryOperation
java.lang.Object
org.locationtech.jtstest.geomop.BufferValidatedGeometryOperation
- All Implemented Interfaces:
GeometryOperation
A
GeometryOperation
which validates the results of the
Geometry
buffer() method.
If an invalid result is found, an exception is thrown (this is the most
convenient and noticeable way of flagging the problem when using the TestRunner).
All other Geometry methods are executed normally.
This class can be used via the -geomop command-line option or by the <geometryOperation> XML test file setting.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private GeometryMethodOperation
private double
private int
private int
private boolean
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new operation which chains to the givenGeometryMethodOperation
for non-intercepted methods. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkContainment
(Geometry geom, Geometry buffer) private void
checkDistance
(Geometry geom, double distance, Geometry buffer) private void
checkEmpty
(Geometry geom) getReturnType
(String opName) Gets the class of the return type of the given operation.Invokes the named operationprivate Geometry
invokeBuffer
(Geometry geom) private Result
invokeBufferOpValidated
(Geometry geometry, Object[] args) private boolean
private void
private void
reportError
(String msg, Coordinate loc) private void
-
Field Details
-
returnEmptyGC
private boolean returnEmptyGC -
chainOp
-
argCount
private int argCount -
distance
private double distance -
quadSegments
private int quadSegments -
endCapStyle
private int endCapStyle
-
-
Constructor Details
-
BufferValidatedGeometryOperation
public BufferValidatedGeometryOperation() -
BufferValidatedGeometryOperation
Creates a new operation which chains to the givenGeometryMethodOperation
for non-intercepted methods.- Parameters:
chainOp
- the operation to chain to
-
-
Method Details
-
getReturnType
Description copied from interface:GeometryOperation
Gets the class of the return type of the given operation.- Specified by:
getReturnType
in interfaceGeometryOperation
- Parameters:
opName
- the name of the operation- Returns:
- the class of the return type of the specified operation
-
invoke
Invokes the named operation- Specified by:
invoke
in interfaceGeometryOperation
- Parameters:
opName
-geometry
-args
-- Returns:
- the result
- Throws:
Exception
- See Also:
-
parseArgs
-
invokeBufferOpValidated
-
invokeBuffer
-
validate
-
isEmptyBufferExpected
-
checkEmpty
-
checkContainment
-
checkDistance
-
reportError
-