com.esri.arcgis.datasourcesraster
Class RasterStatistics

java.lang.Object
  extended by com.esri.arcgis.datasourcesraster.RasterStatistics
All Implemented Interfaces:
IRasterStatistics, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class RasterStatistics
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRasterStatistics

A raster statistics class.

Remarks

A RasterStatistics object provides access to statistics from a raster band.

The RasterStatistics can be retrieved from a RasterBand using IRasterBand interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
RasterStatistics()
          Constructs a RasterStatistics using ArcGIS Engine.
RasterStatistics(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterStatistics theRasterStatistics = (RasterStatistics) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 Object getIgnoredValues()
          Array of doubles indicating the pixel values not included in the statistics calculation.
 double getMaximum()
          Approximate largest value.
 double getMean()
          Approximate average value.
 double getMedian()
          Divides pixel population approximately in halves.
 double getMinimum()
          Approximate smallest value.
 double getMode()
          Approximate most popular pixel value.
 int getSkipFactorX()
          Number of horizontal pixels between samples for purposes of calculating statistics.
 int getSkipFactorY()
          Number of vertical pixels between samples for purposes of calculating statistics.
 double getStandardDeviation()
          Measures spread of pixel values about the mean.
 int hashCode()
          the hashcode for this object
 boolean isValid()
          Indicates if statistics are fresh.
 void recalculate()
          Recalculate statistics based upon current skip factors and ignored values.
 void setIgnoredValues(Object pVal)
          Array of doubles indicating the pixel values not included in the statistics calculation.
 void setIsValid(boolean pVal)
          Indicates if statistics are fresh.
 void setMaximum(double pVal)
          Approximate largest value.
 void setMean(double pVal)
          Approximate average value.
 void setMinimum(double pVal)
          Approximate smallest value.
 void setRasterBand(IRasterBand rhs1)
          The RasterBand.
 void setSkipFactorX(int pVal)
          Number of horizontal pixels between samples for purposes of calculating statistics.
 void setSkipFactorY(int pVal)
          Number of vertical pixels between samples for purposes of calculating statistics.
 void setStandardDeviation(double pVal)
          Measures spread of pixel values about the mean.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

RasterStatistics

public RasterStatistics()
                 throws IOException,
                        UnknownHostException
Constructs a RasterStatistics using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

RasterStatistics

public RasterStatistics(Object obj)
                 throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RasterStatistics theRasterStatistics = (RasterStatistics) obj;

Construct a RasterStatistics using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to RasterStatistics.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getMinimum

public double getMinimum()
                  throws IOException,
                         AutomationException
Approximate smallest value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMinimum in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMinimum

public void setMinimum(double pVal)
                throws IOException,
                       AutomationException
Approximate smallest value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setMinimum in interface IRasterStatistics
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaximum

public double getMaximum()
                  throws IOException,
                         AutomationException
Approximate largest value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMaximum in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMaximum

public void setMaximum(double pVal)
                throws IOException,
                       AutomationException
Approximate largest value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setMaximum in interface IRasterStatistics
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMean

public double getMean()
               throws IOException,
                      AutomationException
Approximate average value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMean in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMean

public void setMean(double pVal)
             throws IOException,
                    AutomationException
Approximate average value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setMean in interface IRasterStatistics
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStandardDeviation

public double getStandardDeviation()
                            throws IOException,
                                   AutomationException
Measures spread of pixel values about the mean.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getStandardDeviation in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStandardDeviation

public void setStandardDeviation(double pVal)
                          throws IOException,
                                 AutomationException
Measures spread of pixel values about the mean.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setStandardDeviation in interface IRasterStatistics
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMedian

public double getMedian()
                 throws IOException,
                        AutomationException
Divides pixel population approximately in halves.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMedian in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMode

public double getMode()
               throws IOException,
                      AutomationException
Approximate most popular pixel value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMode in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isValid

public boolean isValid()
                throws IOException,
                       AutomationException
Indicates if statistics are fresh.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isValid in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setIsValid

public void setIsValid(boolean pVal)
                throws IOException,
                       AutomationException
Indicates if statistics are fresh.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setIsValid in interface IRasterStatistics
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIgnoredValues

public Object getIgnoredValues()
                        throws IOException,
                               AutomationException
Array of doubles indicating the pixel values not included in the statistics calculation.

Remarks

The ignore value is ignored if calculating statistics on a grid.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getIgnoredValues in interface IRasterStatistics
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setIgnoredValues

public void setIgnoredValues(Object pVal)
                      throws IOException,
                             AutomationException
Array of doubles indicating the pixel values not included in the statistics calculation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setIgnoredValues in interface IRasterStatistics
Parameters:
pVal - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSkipFactorX

public int getSkipFactorX()
                   throws IOException,
                          AutomationException
Number of horizontal pixels between samples for purposes of calculating statistics.

Remarks

The skip factor is ignored, always use 1, if calculating statistics on a grid.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSkipFactorX in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSkipFactorX

public void setSkipFactorX(int pVal)
                    throws IOException,
                           AutomationException
Number of horizontal pixels between samples for purposes of calculating statistics.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSkipFactorX in interface IRasterStatistics
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSkipFactorY

public int getSkipFactorY()
                   throws IOException,
                          AutomationException
Number of vertical pixels between samples for purposes of calculating statistics.

Remarks

The skip factor is ignored, always use 1, if calculating statistics on a grid.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSkipFactorY in interface IRasterStatistics
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSkipFactorY

public void setSkipFactorY(int pVal)
                    throws IOException,
                           AutomationException
Number of vertical pixels between samples for purposes of calculating statistics.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSkipFactorY in interface IRasterStatistics
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRasterBand

public void setRasterBand(IRasterBand rhs1)
                   throws IOException,
                          AutomationException
The RasterBand.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setRasterBand in interface IRasterStatistics
Parameters:
rhs1 - A reference to a com.esri.arcgis.datasourcesraster.IRasterBand (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

recalculate

public void recalculate()
                 throws IOException,
                        AutomationException
Recalculate statistics based upon current skip factors and ignored values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
recalculate in interface IRasterStatistics
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.