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
public IGeoDataset PointDensity (
    IGeoDataset pointFeatures,
    IRasterNeighborhood nbrhood,
    ref object scaleFactor

Optional Values

scaleFactor   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
HRESULT PointDensity(
  IGeoDataset* pointFeatures,
  IRasterNeighborhood* nbrhood,
  VARIANT* scaleFactor,
  IGeoDataset** PointDensity


pointFeatures [in]

  pointFeatures is a parameter of type IGeoDataset

nbrhood [in]

  nbrhood is a parameter of type IRasterNeighborhood

scaleFactor [optional]   scaleFactor 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.

PointDensity [out, retval]

  PointDensity is a parameter of type IGeoDataset

Product Availability

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



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.


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)


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