Using RasterDensityOp in a Standalone VB Application

Created:4/3/2001
Description:

This code using RasterDensityOp as an example shows the basic steps to perform a spatial operation in a standalone VB application. The steps include checking in Spatial Analyst license, creating Spatial operator, setting spatial analysis environment for the operator, perform the spatial operation as well as saving the result.

How to use:
  1. Change the input file name and directory to fit your data.
  2. Change output working directory ("c:\temp" in code) if necessary.
  3. Change output grid name ("out0" in code) if necessary.
  4. Change cell size of the output and neighborhood size if necessary.
  5. Run the VB project, a grid will be created

Application:
Standalone VB

Requires: Spatial Analyst Extension License

Difficulty: Beginner


Visual Basic
File Description
DensityStandalone.bas Module file
DensityStandalone.vbp VB project file


Key CoClasses: RasterDensityOp, RasterNeighborhood
Key Interfaces: IDensityOp, IRasterNeighborhood, IRasterAnalysisEnvironment
Key Members: IDensityOp::PointDensity, IRasterNeighborhood::SetCircle, IRasterAnalysisEnvironment::OutWorkspace, IRasterAnalysisEnvironment::SetCellSize, IRasterAnalysisEnvironment::SetExtent