Package org.locationtech.jtstest.geomop
Class PreparedGeometryOperation
- java.lang.Object
-
- org.locationtech.jtstest.geomop.PreparedGeometryOperation
-
- All Implemented Interfaces:
GeometryOperation
public class PreparedGeometryOperation extends Object implements GeometryOperation
AGeometryOperation
which usesPreparedGeometry
s for applicable operations. This allows testing correctness of the PreparedGeometry implementation.This class can be used via the -geomop command-line option or by the <geometryOperation> XML test file setting.
- Author:
- mbdavis
-
-
Constructor Summary
Constructors Constructor Description PreparedGeometryOperation()
PreparedGeometryOperation(GeometryMethodOperation chainOp)
Creates a new operation which chains to the givenGeometryMethodOperation
for non-intercepted methods.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getReturnType(String opName)
Gets the class of the return type of the given operation.Result
invoke(String opName, Geometry geometry, Object[] args)
Invokes the named operation
-
-
-
Constructor Detail
-
PreparedGeometryOperation
public PreparedGeometryOperation()
-
PreparedGeometryOperation
public PreparedGeometryOperation(GeometryMethodOperation chainOp)
Creates a new operation which chains to the givenGeometryMethodOperation
for non-intercepted methods.- Parameters:
chainOp
- the operation to chain to
-
-
Method Detail
-
getReturnType
public Class getReturnType(String opName)
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
public Result invoke(String opName, Geometry geometry, Object[] args) throws Exception
Invokes the named operation- Specified by:
invoke
in interfaceGeometryOperation
- Parameters:
opName
-geometry
-args
-- Returns:
- the result
- Throws:
Exception
- See Also:
GeometryOperation.invoke(java.lang.String, org.locationtech.jts.geom.Geometry, java.lang.Object[])
-
-