Custom Solver



Description:

This sample provides a custom Network Analyst solver for traversing a Network Dataset and finding connected/disconnected network components.
Products:
Engine: VC++
ArcView: VC++

Platforms: Windows

Minimum ArcGIS Release: 9.2

How to use:
[VC++]
  1. Open the solution file in Visual Studio and build the solution
  2. Start ArcMap
  3. Add a Network Dataset to the map
  4. Open the Network Analyst toolbar and click on "Network Analyst > New Connectivity"
  5. Load locations into the "Seed Points" layer of the "Connectivity" analysis layer
  6. Click Solve
  7. Lines are added to the "Lines" layer that reference source features that are not connected to any of the seed points
  8. Right-click on the "Connectivity" layer and click on "Properties" to change the properties of the analysis layer, including whether you want to output the connected features instead of the disconnected features and whether you want to generate the line geometry or not
  9. Re-solve to see the effects of changing the analysis layer properties

Download the Visual C++ files
ConnectivitySolver.h Header file for defining the connectivity solver.
ConnectivitySolver.cpp Implementation of the connectivity solver.
ConnectivitySymbolizer.h Header file for defining the connectivity solver's custom symbolizer.
ConnectivitySymbolizer.cpp Implementation of the connectivity solver's custom symbolizer.
ConnSolverPropPage.h Header file for defining the connectivity solver's custom property page.
ConnSolverPropPage.cpp Implementation of the connectivity solver's custom property page.
DataStructures.h Header file for defining custom data structures.
NameConstants.h Header file for defining custom string values.
Resource.h Header file for defining resource IDs.
StdAfx.h Used for building a precompiled header file and precompiled type file.
StdAfx.cpp Used for building a precompiled header file and precompiled type file.
CustomSolver.cpp Object map and DLL exports.
CustomSolver.rc Contains a listing of all of the Microsoft Windows resources that the program uses.
CustomSolver.rgs Registration script for the custom solver project.
_CustomSolver_i.c GUID definitions for the project.

Download the files for all languages



Key Libraries: Carto, Geometry, Display, Framework, System, SystemUI, GeoDatabase, NetworkAnalyst
Key CoClasses:NAContext, NALayer
Key Interfaces: INASolver, INASymbolizer2, INetworkQuery, INetworkForwardStar, INAContext, INAClass, INALocation
Key Members: