com.esri.adf.web.util
Class ADFUtil

java.lang.Object
  extended by com.esri.adf.web.util.ADFUtil

public class ADFUtil
extends Object

This class contains the utility methods that can be used within the ADF core objects.


Method Summary
static
<T extends Serializable>
T
copy(T src)
          Create a copy of the specified Serializable object.
static boolean isGeoTransformAvailable(WebSpatialReference sr1, WebSpatialReference sr2)
          Indicates whether a geotransformation is available between these two spatial references.
static WebExtent reaspect(WebExtent extent, double width, double height)
          Adjusts the current envelope based on the aspect ratio of the given width and height.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

reaspect

public static WebExtent reaspect(WebExtent extent,
                                 double width,
                                 double height)
Adjusts the current envelope based on the aspect ratio of the given width and height.

Parameters:
extent - the extent to be reaspect
width - the image width in pixels.
height - the image height in pixels.
Returns:
the reaspected extent

copy

public static <T extends Serializable> T copy(T src)
                                   throws ADFException
Create a copy of the specified Serializable object.

Parameters:
src - the object to create a copy
Returns:
the copy of the specified object
Throws:
ADFException

isGeoTransformAvailable

public static boolean isGeoTransformAvailable(WebSpatialReference sr1,
                                              WebSpatialReference sr2)
Indicates whether a geotransformation is available between these two spatial references. Use this method to find out if two resources with different spatial references can be used together, or if the WebContext can be safely reprojected to a new spatial reference.

Parameters:
sr1 - from spatial reference
sr2 - to spatial reference
Returns:
boolean true, if geotransformation available
See Also:
WebContext.setSpatialReference(WebSpatialReference)