public abstract class GeometryOperation extends Object
public class MyOperation extends GeometryOperation { // Check GeometryManager for alternative methods to register an operation public static final int CODE = GeometryManager.getInstance() .registerGeometryOperation("MyOperation", new MyOperation(), geomType); public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException { // Operation logic goes here } public int getOperationIndex() { return CODE; } }
Modifier and Type | Field and Description |
---|---|
static int |
OPERATION_CONTAINS_CODE |
static String |
OPERATION_CONTAINS_NAME |
static int |
OPERATION_INTERSECTS_CODE |
static String |
OPERATION_INTERSECTS_NAME |
Constructor and Description |
---|
GeometryOperation() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getOperationIndex()
Returns the constant value that identifies this operation and that was obtained upon registering it.
|
abstract Object |
invoke(Geometry geom,
GeometryOperationContext ctx)
Invokes this operation given the geometry and context
|
public static final String OPERATION_INTERSECTS_NAME
public static final String OPERATION_CONTAINS_NAME
public static int OPERATION_INTERSECTS_CODE
public static int OPERATION_CONTAINS_CODE
public abstract Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException
geom
- Geometry to which apply this operationctx
- Parameter containerGeometryOperationException
- The implementation is responsible to throw this exception when needed.public abstract int getOperationIndex()