Addressing Application

Created:10/01/2002
Description:

This Developer Sample code is designed to allow the addressing of centerline and structure features. There are three methods supported for addressing centerlines, the continuum method, the user-defined method and the grid method.

For the Continuum method an origin location is specified and new centerlines are addressed based on their distance from this origin location. Since some of the distances can become quite large for a large area, a factor can be specified to divide into the address to avoid high address range numbers. The address ranges are based on the length of the distance of the centerline from the origin location, the factor, the specified length between the addresses and the length of the centerline feature.

Unlike the Continuum method, where the lower address range is based on the distance between the centerline and an origin location, the User-Defined method requires that the lower address range is specified by the user(lower-right if the even addresses are on the right side of the centerline and lower-left if the even addresses are on the left side of the centerline). The address ranges are based on the user-specified lower address, the length between the addresses and the length of the centerline feature.

The Grid method is an approach to addressing centerlines using a polygon layer (grid) containing a field with East-West numbers and a field with North-South numbers. A centerline with a North-South orientation will be given a value from the North-South field of the grid layer depending on which polygon contains the centerline's "from-node." A centerline with a East-West orientation will be given a value from the East-West field of the grid layer depending on which polygon contains the centerline's "from-node."

There are also tools available to address structures. Structures can be polygon or point features. In the structure's addressing tools the user can link fields between the structures and centerlines that share the same values. As an example, If the centerline's layer has an attribute such as zip-code that also needs to be populated for the structure, the centerline's zipcode field and the structure's zipcode field could be linked. Therefore, as each structure is addressed, the zipcode field for the structure is automatically populated with the zipcode of the centerline.

Once a centerline or structure is addressed the feature will change to a different color specified by the user, allowing the user to visually determine which features have been edited. The rendering is based on the values in a symbol field. This field is populated automatically after each edit is saved through the addressing tools. Therefore, before addressing the centerlines and structures, add a string field with a length of 25 that will be used for storing the edit color information.

For more specific information on using the sample, please see the ReadMe.doc file included with the code.

Options on the toolbar include:

  • Address Centerlines - Generate address ranges based on one of the three methods described above.
  • Address Structures - Generate an address for a structure based on an addressed centerline layer.
  • Calculate ESN for Centerlines or Structures - Populate an ESN field for centerlines or structures based on a ESN polygon layer.
  • Split at Intersection - Split a centerline and modify the address ranges based on an intersecting centerline.


  • How to use:
    1. Double click on the _Install.bat file included with the code. This batch file will register the Addressing.dll and put all the included classes in the correct categories. The classes include one editor extension, one toolbar, and six commands/Tools. The install and uninstall batch files assume the regsvr32 command is accessible from the system path.
    2. Add the centerline and structure layers to your map session.
    3. Open the Tutorial.doc file included with the code and follow the procedures to address centerlines and structures.
    
    Application:
    ArcMap

    Requires: Centerline and Structure layers and an edit session

    Difficulty: Advanced


    Visual Basic
    File Description
    frmParameters.frm Form for specifying addressing method and other centerline parameters.
    frmAddressCL.frm Form for addressing centerlines.
    frmDefineStructures.frm Form for defining structure parameters.
    frmAddressStructures Form for addressing structures.
    frmChooseColor.frm Form for displaying the color options for edited features.
    frmChain.frm Form for defining the beginning and ending centerline features when addressing several features at once.
    frmSplitParams.frm Form for defining address range attributes when splitting a centerline feature.
    modFunctions.bas Basic module containing routines used throughout the project.
    AddressToolbarDef.cls Class for the Addressing toolbar.
    clsAddressingCenterlines.cls Class containing the implementation of ICommand for the Centerline Addressing Wizard.
    clsAddressingStructures.cls Class containing the implementation of ICommand for the Structure Addressing Wizard.
    clsAssignAddress.cls Class containing the implementation of ICommand and ITool for selecting and addressing a structure.
    clsChooseOrigin.cls Class containing the implementation of ICommand and ITool to locate an origin point for the Continuum Addressing method.
    clsEditor.cls Class for the Editor extension.
    clsESNCalculation.cls Class containing the implementation of ICommand for the ESN Calculation Wizard.
    SplitAtInt.cls Class containing the implementation of ICommand and ITool for splitting a centerline and modifying its address range.


    Key CoClasses: Editor, SpatialFilter
    Key Interfaces: ICurve, IGeoFeatureLayer, IMap
    Key Members: ICurve::Length, ICurve::QueryPointAndDistance, IGeoFeatureLayer::Renderer, IMap::ComputeDistance, IMap::FeatureSelection, IMap::SelectByShape