This document is archived and information here might be outdated.  Recommended version.


IDensityOp.PointDensity Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (SpatialAnalyst)  

IDensityOp.PointDensity Method

Calculates the simple density of points in a neighborhood around each output cell. Density is measured as number of points per unit area.

[Visual Basic .NET]
Public Function PointDensity ( _
    ByVal pointFeatures As IGeoDataset, _
    ByVal nbrhood As IRasterNeighborhood, _
    [ByRef scaleFactor As Object] _
) As IGeoDataset
[C#]
public IGeoDataset PointDensity (
    IGeoDataset pointFeatures,
    IRasterNeighborhood nbrhood,
    ref object scaleFactor
);
[C++]
HRESULT PointDensity(
  IGeoDataset* pointFeatures,
  IRasterNeighborhood* nbrhood,
  Variant* scaleFactor
);
[C++]

Parameters pointFeatures [in]
pointFeatures is a parameter of type IGeoDataset* nbrhood [in]
nbrhood is a parameter of type IRasterNeighborhood* scaleFactor [in, optional]
scaleFactor is a parameter of type VARIANT*

Product Availability

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

Remarks

sourceFeatures

Input point or polyline featureclass, featureclass descriptor or featureDataset used to calculates the density of features around each output cell.

For density functions, SPOT is the default field used when no field has been specified.  If a SPOT field does not exist, then no field will be used, and each feature will be counted only once in the calculation. This is similar to specifying a keyword for the field of "NONE".  If a field other than NONE is used, the field's value (the item value) determines the number of times to count the point.  To specify the field you want form your dataset, use the FeatureClassDescriptor object.

nbrhood

An IRasterNeighborhood defining the configuration of the neighborhoods within which the point desnity will be calculated.
IDensityOp:PointDensity supports any supports any neighborhood supported by IRasterNeighborhood. They include a rectangle, circle, annulus, wedge, and an irregular shaped neighborhood. The neighborhood will be defined by the minimum-bounding rectangle of the specified neighborhood. The minimum-bounding rectangle will include more cells then the specified neighborhood in certain cases such as with a circle, annulus, and wedge.

The neighborhoods types are:

SetAnnulus (innerRadius As Double, outerRadius As Double, unitsType as esriGeoAnalysisUnitsEnum)

SetCircle (radius As Double, unitsType as esriGeoAnalysisUnitsEnum)

SetDefault ()

SetIrregular (height As Long, width As Long, entryValues)

[scaleFactor]

Used to convert the map units of the input dataset to different units. The default value is 1, which calculates density in units of number of points per one square map unit. Effectively, output raster values are multiplied by the square of this factor.

 

See Also

IDensityOp Interface