ArcObjects Library Reference (SpatialAnalyst)  

IGeneralizeOp.Thin Method

Thins rasterized linear features by reducing the number of pixels representing the width of the features.

[Visual Basic .NET]
Public Function Thin ( _
    ByVal Raster As IGeoDataset, _
    ByVal backgroundIsNoData As Boolean, _
    ByVal filterData As Boolean, _
    ByVal roundCorners As Boolean, _
    [ByRef maxThickness As Object] _
) As IGeoDataset
[C#]
public IGeoDataset Thin (
    IGeoDataset Raster,
    bool backgroundIsNoData,
    bool filterData,
    bool roundCorners,
    ref object maxThickness
);
[C#]

Optional Values

maxThickness   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
[C++]
HRESULT Thin(
  IGeoDataset* Raster,
  VARIANT_BOOL backgroundIsNoData,
  VARIANT_BOOL filterData,
  VARIANT_BOOL roundCorners,
  VARIANT* maxThickness,
  IGeoDataset** Thin
);
[C++]

Parameters

Raster [in]

  Raster is a parameter of type IGeoDataset

backgroundIsNoData [in]   backgroundIsNoData is a parameter of type VARIANT_BOOL filterData [in]   filterData is a parameter of type VARIANT_BOOL roundCorners [in]   roundCorners is a parameter of type VARIANT_BOOL maxThickness [optional]   maxThickness is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Thin [out, retval]

  Thin is a parameter of type IGeoDataset

Product Availability

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

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.

 

See Also

IGeneralizeOp Interface