com.esri.arcgis.spatialanalyst
Interface IGeneralizeOp

All Superinterfaces:
Serializable
All Known Implementing Classes:
RasterGeneralizeOp

public interface IGeneralizeOp
extends Serializable

Provides access to members that control the generalization operations.

Remarks

  • Read the Working with ArcGIS Spatial Analyst objects technical document for general information on implementing Spatial Analyst operations.
  • Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.


    Method Summary
     IGeoDataset aggregate(IGeoDataset raster, int cellFactor, int aggregationType, boolean expandExtent, boolean ignoreNoData)
              Generates a reduced resolution version of a raster.
     IGeoDataset boundaryClean(IGeoDataset raster, int sortType, boolean runTwice)
              Smoothes the boundary between zones by expanding and shrinking the boundary.
     IGeoDataset expand(IGeoDataset raster, int numberCells, Object zoneList)
              Expands the selected zones by a specified number of cells.
     IGeoDataset majorityFilter(IGeoDataset raster, boolean useDiagonalNeighbors, boolean halfIsMajority)
              Replaces cells based upon the majority of their contiguous neighboring cells.
     IGeoDataset nibble(IGeoDataset raster, IGeoDataset maskRaster, boolean useNoData)
              Replaces areas in a raster corresponding to a mask, with the values of the nearest neighbors.
     IGeoDataset regionGroup(IGeoDataset raster, boolean useDiagonalNeighbors, boolean withinZones, boolean createLinkField, Object excludedValue)
              Records for each cell in the output, the identity of the connected region to which it belongs.
     IGeoDataset resample(IGeoDataset raster, double newCellSize, int resampleType)
              Resamples the raster to a new cell size.
     IGeoDataset shrink(IGeoDataset raster, int numberCells, Object zoneList)
              Shrinks the selected zones by a specified number of cells.
     IGeoDataset thin(IGeoDataset raster, boolean backgroundIsNoData, boolean filterData, boolean roundCorners, Object maxThickness)
              Thins rasterized linear features by reducing the number of pixels representing the width of the features.
     

    Method Detail

    aggregate

    IGeoDataset aggregate(IGeoDataset raster,
                          int cellFactor,
                          int aggregationType,
                          boolean expandExtent,
                          boolean ignoreNoData)
                          throws IOException,
                                 AutomationException
    Generates a reduced resolution version of a raster.

    Remarks

    raster

    an input Raster, RasterDataset, RasterBand, or RasterDescriptor

    cellFactor

    a factor to multiply the cell size of the input Raster to obtain the desired resolution for the output Raster

    A cellFactor of 3 would result in an output cell size that is three times larger than the input raster’s cell size. The cellFactor must be an integer greater than one.

    aggregationType

    establishes how the value for each output cell will be determined

    The output value for each cell can be the sum (esriGeoAnalysisStatsSum), minimum (esriGeoAnalysisStatsMinimum), maximum (esriGeoAnalysisStatsMaximum), mean (esriGeoAnalysisStatsMean), or median (esriGeoAnalysisStatsMedian) value of the input cells that the coarser output cell will encompass.

    expandExtent

    a Boolean defining how to handle the boundaries of the input raster when its rows and/or columns are not a multiple of the cellFactor

    If the number of rows and columns in the input raster is a multiple of the cellFactor this Boolean will not be applied.

    A True for the Boolean will expand the bottom and/or right boundaries of the input raster so that the total number of cells in a row and/or column is a multiple of the cellFactor. Expanded cells are given a value of NoData. With a True Boolean, the output raster can cover a larger spatial extent than the input raster.

    A False for the Boolean will reduce the number of rows and/or columns in the output raster by one. This will truncate the remaining cells on the bottom and/or right boundaries of the input raster, making the number of rows and/or columns in the input raster a multiple of the cellFactor. With this option, the output raster can cover a smaller spatial extent than the input raster.

    ignoreNoData

    a Boolean that if True dictates that if a NoData value exists for any of the cells that fall within the spatial extent of a larger cell on the output raster, then the NoData value will be ignored when determining the value for that output cell location

    Only input cells within the output cell’s extent that have data values will be used in determining the value of the output cell.

    If False, then any cell that falls within the spatial extent of a larger cell on the output raster that has a value of NoData, the value for that output cell location will be NoData. When the Boolean is True, it is implied that when cells within an aggregation contain the NoData value, there is insufficient information to perform the specified calculations necessary to determine an output value.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    cellFactor - The cellFactor (in)
    aggregationType - A com.esri.arcgis.geoanalyst.esriGeoAnalysisStatisticsEnum constant (in)
    expandExtent - The expandExtent (in)
    ignoreNoData - The ignoreNoData (in)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    boundaryClean

    IGeoDataset boundaryClean(IGeoDataset raster,
                              int sortType,
                              boolean runTwice)
                              throws IOException,
                                     AutomationException
    Smoothes the boundary between zones by expanding and shrinking the boundary.

    Remarks

    raster

    an input Raster, RasterDataset, RasterBand, or RasterDescriptor

    sortType

    specifies the type of sorting. This determines the priority of the cells to expand into their neighbors. There are three different ways to sort, esriGeoAnalysisSortAscending, esriGeoAnalysisSortDescending, and esriGeoAnalysisSortNone.

    esriGeoAnalysisSortAscending sorts zones in ascending order by size. Zones with smaller total areas have a higher priority to expand into zones with] larger total areas.

    esriGeoAnalysisSortDesending sorts zones in descending order by size. Zones with larger total areas have a higher priority to expand into zones with smaller total areas.

    esriGeoAnalysisSortNone does no sorting by size. Zones with larger values have a higher priority to expand into zones with smaller values.

    runTwice

    a Boolean that specifies the number of directions in which the expansion and shrinking will take place.

    If True, the expansion and shrinking is performed according to the sorting type, then does an additional shrinking and expansion with the priority reversed.

    If False, the expansion and shrinking is performed once, according to sorting type.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    sortType - A com.esri.arcgis.spatialanalyst.esriGeoAnalysisSortEnum constant (in)
    runTwice - The runTwice (in)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    expand

    IGeoDataset expand(IGeoDataset raster,
                       int numberCells,
                       Object zoneList)
                       throws IOException,
                              AutomationException
    Expands the selected zones by a specified number of cells.

    Remarks

    geoDataset

    an input Raster, RasterDataset, RasterBand, or RasterDescriptor

    numberCellst

    the number of cells to expand each selected zone

    zoneList

    a listing of values (array of type long) from the table of the input raster indicating the zones to select. The default field is Value.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    numberCells - The numberCells (in)
    zoneList - A Variant (in)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    majorityFilter

    IGeoDataset majorityFilter(IGeoDataset raster,
                               boolean useDiagonalNeighbors,
                               boolean halfIsMajority)
                               throws IOException,
                                      AutomationException
    Replaces cells based upon the majority of their contiguous neighboring cells.

    Remarks

    raster

    an input Raster, RasterDataset, RasterBand, or RasterDescriptor

    useDiagonalNeighbors

    a Boolean specifying the number of cells in the filter kernel

    If True, then the kernel of the filter will be the eight nearest neighbors (a 3-by-3 window) to the present cell.

    If False, then the kernel of the filter will be the four direct (orthogonal) neighbors to the present cell. This is the default.

    halfIsMajority

    a Boolean specifying the number of contiguous (spatially connected) cells that must be of the same value before a replacement will occur

    If True, half of the cells must have the same value and be contiguous. Two out of four or four out of eight connected cells must have the same value. Half will have more of a smoothing effect.

    If False, a majority of cells must have the same value and be contiguous. Three out of four or five out of eight connected cells must have the same value. This is the default.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    useDiagonalNeighbors - The useDiagonalNeighbors (in)
    halfIsMajority - The halfIsMajority (in)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    nibble

    IGeoDataset nibble(IGeoDataset raster,
                       IGeoDataset maskRaster,
                       boolean useNoData)
                       throws IOException,
                              AutomationException
    Replaces areas in a raster corresponding to a mask, with the values of the nearest neighbors.

    Remarks

    raster

    an input Raster dataset

    maskRaster

    the name of a Raster to be used as the mask. Cells with NoData as their value will be nibbled in the first input raster

    useNoData

    Boolean defining if NoData values in the raster are allowed to nibble into the area defined by the maskRaster

    If True, then the nearest neighbor value will be used whether it is NoData or another data value in the first input raster. NoData values in the first input raster are free to nibble into areas defined in the maskRaster if they are the nearest neighbor.

    If False, then only data values are free to nibble into areas defined in the maskRaster. NoData values in the first input raster are not allowed to nibble into areas defined in the maskRaster even if they are the nearest neighbor.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    maskRaster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    useNoData - The useNoData (in)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    regionGroup

    IGeoDataset regionGroup(IGeoDataset raster,
                            boolean useDiagonalNeighbors,
                            boolean withinZones,
                            boolean createLinkField,
                            Object excludedValue)
                            throws IOException,
                                   AutomationException
    Records for each cell in the output, the identity of the connected region to which it belongs.

    Remarks

    raster

    An input Raster, RasterDataset, RasterBand, or RasterDescriptor whose cells define the zone values to be regrouped

    useDiagonalNeighbors

    Defines the manner in which to evaluate connectivity between cells

    If True, the connectivity between cells of the same value if they are within the immediate eight-cell neighborhood (eight nearest neighbors) of each other will be used. This includes if they are to the right or left, above or below, or are diagonal to each other.

    If False, the connectivity between cells of the same value only if the cells are directly to the right or left, or above or below each other—the four nearest neighbors will be used. If two cells with the same value are diagonal from one another, they are not considered connected

    withinZones

    Defines the requirement of which cell values should be considered when testing for connectivity

    If True, will test for the connectivity between input values that are the same within the same zone. The only cells that can be grouped are cells from the same zone (the same value) and that meet the spatial requirements of connectivity specified by useDiagonalNeighbors Boolean.

    If False, will test the connectivity by the spatial requirements specified by the useDiagonalNeighbors Boolean between cells with any values except for the excluded value identified by the argument excludedValue if one is specified. A value for the excludedValue argument must be input when withinZones Boolean is False.

    createLinkField

    Defines if a Link item is added to the value attribute table of the output Raster

    If True, an item Link will be added to the table of the output Raster. The Link item stores the original values for each newly created zone (created from disconnected regions) from the input Raster before they were regrouped.

    If False, the table for the output Raster will only contain the items Value and Count.

    [excludedValue]

    Identifies a value such that if a cell location contains the value, no spatial connectivity will be evaluated no matter what the Boolean is for the useDiagonalNeighbors

    Cells with the excluded value will be treated as NoData and are eliminated from calculations. Cell locations that contain an excluded value will receive zero for the location on the output Raster. The excluded value is similar to the concept of a background value or setting a mask for a single function with the Options dialog. It is particularly useful in conjunction with a False value for within Zones.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    useDiagonalNeighbors - The useDiagonalNeighbors (in)
    withinZones - The withinZones (in)
    createLinkField - The createLinkField (in)
    excludedValue - A Variant (in, optional, pass null if not required)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    resample

    IGeoDataset resample(IGeoDataset raster,
                         double newCellSize,
                         int resampleType)
                         throws IOException,
                                AutomationException
    Resamples the raster to a new cell size.

    Remarks

    raster

    an input Raster, RasterDataset, RasterBand, or RasterDescriptor whose cells define the zone values to be regrouped

    newCellSize

    ouput cellsize. The default is the current environment setting.

    ResampleType

    An esriGeoAnalysisResampleEnum specifing the resampling algorithm to be used when sampling a Raster

    See 'How it works' for a full description of the resampling methods.

    esriGeoAnalysisResampleBilinear bilinear interpolation

    esriGeoAnalysisResampleCubic cubic convolution

    esriGeoAnalysisResampleNearest nearest neighbor assignment

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    newCellSize - The newCellSize (in)
    resampleType - A com.esri.arcgis.geoanalyst.esriGeoAnalysisResampleEnum constant (in)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    shrink

    IGeoDataset shrink(IGeoDataset raster,
                       int numberCells,
                       Object zoneList)
                       throws IOException,
                              AutomationException
    Shrinks the selected zones by a specified number of cells.

    Remarks

    raster

    An input Raster, RasterDataset, RasterBand, or RasterDescriptor

    numberCells

    The number of cells to shrink each selected zone

    zoneList

    A listing of values (array of type long) from the table of the input raster indicating the zones to select. The default field is Value.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    numberCells - The numberCells (in)
    zoneList - A Variant (in)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.

    thin

    IGeoDataset thin(IGeoDataset raster,
                     boolean backgroundIsNoData,
                     boolean filterData,
                     boolean roundCorners,
                     Object maxThickness)
                     throws IOException,
                            AutomationException
    Thins rasterized linear features by reducing the number of pixels representing the width of the features.

    Remarks

    raster

    an input Raster, RasterDataset, RasterBand, or RasterDescriptor to be thinned

    BackgroundIsNoData

    a Boolean that specifies the cell values that will identify the foreground cells

    The Raster is viewed as a set of foreground cells and background cells. Foreground cells form the linear features to be converted to vectors.

    If True, all cells with valid values belong to the foreground. All cells whose Value is NoData belong to the background.

    If False, all cells whose Value is greater than zero belong to the foreground. All cells whose Value is less or equal to zero or NoData will belong to the background.

    filterData

    specifies whether or not a filter will be applied as the first phase of thinning

    If True, the Raster will be filtered to smooth the boundaries between foreground and background cells.

    This option will eliminate minor irregularities from the out Raster. If False, no filter will be applied.

    roundCorners

    a Boolean that specifies whether round or sharp turns will be made at turns or junctions

    It is also used during the vector conversion process to spline curves or create sharp intersections and corners.

    If True, attempts to smooth corners and junctions. This is best for vectorizing natural features such as contours or streams.

    If False, attempts to preserve rectangular corners and junctions. This is best for vectorizing man-made features such as streets.

    [maxThickness]

    the maximum thickness, in map units, of linear features in the input grid

    A commonly used thickness is 10 times the cell size.

    Product Availability

    Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

    Supported Platforms

    Windows, Solaris, Linux

    Parameters:
    raster - A reference to a com.esri.arcgis.geodatabase.IGeoDataset (in)
    backgroundIsNoData - The backgroundIsNoData (in)
    filterData - The filterData (in)
    roundCorners - The roundCorners (in)
    maxThickness - A Variant (in, optional, pass null if not required)
    Returns:
    A reference to a com.esri.arcgis.geodatabase.IGeoDataset
    Throws:
    IOException - If there are interop problems.
    AutomationException - If the ArcObject component throws an exception.