org.gvsig.fmap.geom.operation.fromjts
Class FromJTS

java.lang.Object
  extended by org.gvsig.fmap.geom.operation.GeometryOperation
      extended by org.gvsig.fmap.geom.operation.fromjts.FromJTS

public class FromJTS
extends GeometryOperation

Converts a geometry from JTS to DAL format. This is a special geometry operation because don't use the Geometry parameter and returns a JTS geometry. This kind of operation can be called from the GeometryManager using invokeOperation.

This operation needs a JTS geometry loaded in the context. The only attribute of the GeometryOperation have to be a geometry of this type and the ID of this attribute will be JTSGeometry.

Author:
Nacho Brodin (nachobrodin@gmail.com)

Field Summary
static int CODE
           
protected static com.vividsolutions.jts.geom.GeometryFactory geomFactory
           
protected static GeometryManager geomManager
           
static String NAME
           
static String PARAM
           
 
Fields inherited from class org.gvsig.fmap.geom.operation.GeometryOperation
OPERATION_CONTAINS_CODE, OPERATION_CONTAINS_NAME, OPERATION_INTERSECTS_CODE, OPERATION_INTERSECTS_NAME
 
Constructor Summary
FromJTS()
           
 
Method Summary
 int getOperationIndex()
          Returns the constant value that identifies this operation and that was obtained upon registering it.
 Object invoke(Geometry geom, GeometryOperationContext ctx)
          Invokes this operation given the geometry and context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

PARAM

public static final String PARAM
See Also:
Constant Field Values

geomManager

protected static GeometryManager geomManager

CODE

public static final int CODE

geomFactory

protected static final com.vividsolutions.jts.geom.GeometryFactory geomFactory
Constructor Detail

FromJTS

public FromJTS()
Method Detail

getOperationIndex

public int getOperationIndex()
Description copied from class: GeometryOperation
Returns the constant value that identifies this operation and that was obtained upon registering it.

Specified by:
getOperationIndex in class GeometryOperation
Returns:
operation unique index

invoke

public Object invoke(Geometry geom,
                     GeometryOperationContext ctx)
              throws GeometryOperationException
Description copied from class: GeometryOperation
Invokes this operation given the geometry and context

Specified by:
invoke in class GeometryOperation
Parameters:
geom - Geometry to which apply this operation
ctx - Parameter container
Returns:
Place-holder object that may contain any specific return value.
Throws:
GeometryOperationException - The implementation is responsible to throw this exception when needed.


Copyright © 2004-2012 gvSIG. All Rights Reserved.