com.esri.adf.web.data.geometry
Class GeometryOperations

java.lang.Object
  extended by com.esri.adf.web.data.geometry.GeometryOperations
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AGSGeometryOperations, WebGeometryOperations

public abstract class GeometryOperations
extends Object
implements Serializable

This class encapsulates the different geometric operations that can be performed on WebGeometry objects.

See Also:
Serialized Form

Constructor Summary
GeometryOperations()
           
 
Method Summary
static GeometryOperations getDefaultInstance()
          Returns the implementation for performing geometric operations.
abstract  List<WebGeometry> project(List<? extends WebGeometry> geometries, WebSpatialReference toSR)
          Projects the list of geometries to the specified spatial reference.
abstract  WebGeometry project(WebGeometry geometry, WebSpatialReference toSR)
          Projects the geometry to the specified spatial reference.
static void setDefaultInstance(GeometryOperations operations)
          Sets the instance that should be used for performing geometric operations.
abstract  String toString()
          Returns the user friendly name for the concrete implementation class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeometryOperations

public GeometryOperations()
Method Detail

getDefaultInstance

public static final GeometryOperations getDefaultInstance()
Returns the implementation for performing geometric operations. By default an instance of WebGeometryOperations is used.

Returns:
the default instance

setDefaultInstance

public static final void setDefaultInstance(GeometryOperations operations)
Sets the instance that should be used for performing geometric operations. This instance must be thread-safe. By default an instance of WebGeometryOperations is used. This method should be called only once, subsequent invocations will not have any effect.

Parameters:
operations - a concrete implementation of GeometryOperations class

project

public abstract List<WebGeometry> project(List<? extends WebGeometry> geometries,
                                          WebSpatialReference toSR)
Projects the list of geometries to the specified spatial reference. Also all the geometries that are passed must be in the same spatial reference.

Parameters:
geometries - the geometries to project
toSR - the spatial reference to which the geometries are to be projected
Returns:
a java.util.List of projected geometries

project

public abstract WebGeometry project(WebGeometry geometry,
                                    WebSpatialReference toSR)
Projects the geometry to the specified spatial reference.

Parameters:
geometry - the geometry to project
toSR - the spatial reference to which the geometry to be projected
Returns:
the projected geometry

toString

public abstract String toString()
Returns the user friendly name for the concrete implementation class.

Overrides:
toString in class Object