A VBA Integrated Interface for Transportation Network dependent Applications

Andrew Y. Kudowor, Ph.D.

Abstract

This Paper explains the development of the foundation of an integrated information interface to a Geographic Information System (GIS) in a relatively new environment, which is designed specifically for applications dependent on transportation network modeling (TNM). We identify frequently used operations in transportation network modeling and developed an easy to use interface intended to simplify the frequently used operations, including network feature and attribute editing and analysis. The design of the interface takes into consideration the typical requirements of the TNM process at HGAC transportation department. The development environment comprises of Esri's PC ArcInfo 8 (ArcMap, ArcCatalog, and ArcToolbox) and the Integrated Development Environment (VBA) of ArcMap. The paper describes the development process and the implementation of the tools used and concludes with discussion of future extensions to the interface.


1. Introduction

Geographic Information Systems are computer tools that correlate data about objects in real life to their respective geographic locations. They have been applied to a wide range of application areas with diverse requirements. In order to satisfy these requirements, GIS software developers provide a generic suite of multi-purpose software modules with the capabilities of application development. However with a unique task per industry, the generic suite of software modules becomes complex in its application. Users want an easy to use interface, which is unique to their problem solving operations, and a customization environment that is easy to manipulate and offers access to effective tools.

The research reported here identifies the frequently used cumbersome TNM operations at HGAC, which until recently were handled in ArcInfo 7 in a Unix environment, and presents the development of the foundation of an easy to use interface that simplifies the modeling operation in a PC ArcInfo 8 environment. It describes the development environment and tools that were implemented.

The benefits of a successful easy to use Interface include, allowing personnel to quickly integrate into the unique problem solving operation, saves time and money on hiring house full of general purpose software expects, and delivers precisely what users need.

2. GIS in Transportation Network Modeling Process

In transportation engineering, GIS is used among others, to reach decisions about traffic planning, to develop network models including traffic analysis zones (TAZ), and to map results of travel forecast model analysis. The topological capabilities of GIS are also used to answer queries about shortest routes between destinations, adjacency of highways to municipal boundaries, or the intersection of streets with a specific highway. GIS is also used in the development of intelligent transportation systems (Eylon 2000), where incase of accident vehicles will be able to automatically send a MayDay to the nearest 911 center with details on the situation and a precise location reading.

At HGAC transportation department the situation is no different. It is a three-stage modeling process (Fig. 1). Network development and maintenance is done using ArcInfo and ArcView GIS. A network comprises of coverage of links and nodes. Each link represents a roadway facility in a particular scenario year with the attributes or roadway characteristics of that facility coded on the link. Separate point coverage of the x and y coordinates for each link-break is also maintained separately. HGAC's Traffic Analysis Zones (TAZ) and the Area Types are polygon coverages maintained in ARC/INFO or ARCVIEW environments. The network modeling was original done using ArcInfo 7 in the cumbersome command driven Unix environment. The migration to PC ArcInfo environment, which is relatively new at HGAC, warrants an easy to use interface that will immediately integrate personnel into the unique problem solving operation.

Fig.1. The Three Stage Transportation Modeling Process

After the network is developed the following transportation network maintenance (check) are carried out with GIS:

Once the above processes are completed the network is exported to Emme2 for the typical four main transportation modeling namely:

The final stage involves using GIS for traffic analysis. After the modeling process, HGAC uses software called M2probe to extract modeled data from the Emme/2 databank for analysis. M2probe is an Arcview extension software. Analysis performed includes Vehicle Miles Travel (VMT), and Level OF Mobility (LOM) calculations. In addition HGAC uses ARC/INFO and Arcview to map the results of the modeling and analysis.

3. Requirements for the Integrated Interface

From the above discussions, the target requirements for an interface capable of handling the TNM application needs include:

  1. Capable of editing and updating transportation network information.
  2. Capable of automating the three-stage transportation modeling process (section 2).
  3. Seamless integration between the various modules of the system for easy access of transportation network information from all modules of the system.
  4. Capable of performing transportation network maintenance.
  5. Easy access and ease of use to allow utilization of the system by various TNM personnel.

4. The Interface Development Process

The stages involved in the Interface development process are illustrated in Fig 2. The first stage in the development of the TNM Interface application was to establish user requirements (section 2.1). This was accomplished as a result of dialogue with TNM representatives and existing documentation on the TNM process in the Unix environment.

Fig.2. Stages of the Development Process

As a result of the flexibility of the tools used, the application specification stage was accomplished by developing a graphical representation of the interface using forms and control objects of the development environment (section 4.2), with documentation explaining how it will operate. This was easy to develop and enabled users to more easily comprehend the interface application and make suggestions for adjusting and modifying the initial specifications. This forms the basis for determining if the interface meets its requirements.

In the application design stage the codes that put intelligence behind the components of the graphical representation of the interface were developed. This includes how code documentation, naming convention, error handling, and data sharing procedures were accomplished.

5. The Interface and Development Environment

This section gives a general overview of the interface design and the description of the development environment and the tools used.

Interface Design

The interface is launched by clicking the "Transportation Network Interface" button on the "Transportation Network Menu" tool bar (Fig.3), which was created with other command buttons to be used interactively with operations of the interface. Users can also access the visual basic editor from this tool bar.

Fig.3. The Transportation Network Menu Tool Bar

The interface consists of six sections (Fig. 4). The editing mode section allows you to enter and exit edit modes with the help of a click of a button. The attribute selection and analysis section allows users to select attributes of interest for editing, an example is clicking the "Lanes…" button (Fig.5), presents you with a dialogue with all the lanes for the various scenarios in the database. Users can then select specific lanes and a dialog of these lanes pops up for editing (Fig.5). Details of the functionalities of the interface buttons and pop up submenus (Fig.5) can be found in Onuogu and Kudowor, 2000.

The feature selection and analysis section allows users to select network features either by their attributes or directly from the screen for editing and analysis. Users can also list the attributes of selected features for editing. The feature sketching and editing section provides tools for adding new features and feature attributes to the database.

The editing tools section provides the standard network feature editing tools (Fig.5). Fig.4. Sections That Make up The Interface

The Development Environment

The interface reported in this project was developed using the customization environment present within the new applications in PC ArcInfo 8 (ArcMap and ArcCatalog). The environment includes three levels of ArcInfo customization; menu-driven, VBA, and Object-Component programming (Fig.6), two of which utilize ArcObjects directly. ArcObjects comprise a technology framework, an object-oriented geographic data model, and an integrated library of software components. For details on ArcObjects and ArcInfo's object model readers are referred to Esri, 1999.

Menu-driven customization is the simplest level and requires no programming, hence no direct use of ArcObjects. Using the standard ArcInfo graphic user interface (GUI), controls (e.g. buttons and toolbars) can be added or removed from the user interface and menus can be added to the user interface by simply checking a box. This level was used to create the transportation network menu toolbar (Fig. 3).

Fig.5. The Interface at a Glance (Interconnection b/n Menus

The second level, which was implemented in the development of the transportation network analysis menu interface (Fig.5), involves ArcInfo's in-built Visual Basic for Applications (VBA). ArcMap and ArcCatalog applications include a fully working VBA development environment, including an integrated debugger that provides access to all the ArcObjects technology. It offers a sophisticated set of programming tools based on Microsoft visual basic that was used to harness the power of the ArcInfo application. Using VBA it was possible to add modules, class modules, and user forms to ArcInfo projects, it is also possible to create applications based on ArcObjects that run within the ArcMap and ArcCatalog application frameworks. Visual Basic and VBA have a major difference: A VB application is launched as an application in its own right, whereas a VBA program has to be launched by the host application. In either case, the starting point you choose is decided by the type of application you're writing, as well as by the facilities offered by your development environment for launching applications. All the procedures developed were saved in ArcMap's normal.mxt file, so that anytime ArcMap is launched the interface will also be loaded. Saving it in map.mxd allows you to access the interface only if the particular project is loaded. One of the great relieves of using VBA for this project was the ability to access ArcMap custom commands from the interface application. Calling existing commands involves working with the ArcID module located in the normal template of the application (Fig.7) i.e. Normal.mxt or Normal.gxt.

Fig.6. Simplified View of ArcInfo Customization Environment

The VBA option was chosen due to the fact that it is fully integrated within the application and there is no need to compile a DLL, register it onto the host computer, and load it into the application in order to execute it as a custom tool. VBA provides a run-time development environment for the user to create custom processes. When using VBA, ArcMap/ArcCatalog can be running whiles you access the VB editor and create your codes and you have the ability to debug your codes in the application it is running while writing it. Variables and results can be checked and performance can be monitored without having to exit ArcMap. Its programming environment is relatively easy to master.

The Visual Basic Editor (Fig.7) is a top-level window that always runs in the same process as your application and similar to a standard VB editor, one of the many reasons for VBA's excellent performance. It offers an integrated development environment with which to write and debug code, design dialog boxes and wizards, and browse object models of other VBA-enabled applications such as Microsoft Office 2000. The Project window (Fig. 7) is used to manage all components of a VBA project. These components include objects that are exposed by ArcMap and ArcCatalog, as well as UserForms, code modules, and class modules. The properties window is used to change properties of the controls on a form. When you select a control on the form, the property window list all properties related to that control. The design and coding environment is where you design forms, edit and write codes for your application's form. You can access the coding environment for a specific control by double clicking on it.

The Toolbox window is a collection of controls you can place on your application's form window. Additional controls can be added to the toolbox window from the additional control dialog.

The third level involves writing of COM objects. COM stands for component object model and is a protocol that connects one software component or module with another. By making use of this protocol, it is possible to build reusable software components that can be dynamically interchanged in a distributed system. Developing with COM means developing using interfaces. All communication between COM components is made via the components' interfaces. When working with COM objects, the developer never has a hold of the COM object directly but holds a reference to it via one of its interface.

Fig.7. Screen Shot of ArcMap VBA Editor

Interfaces are made up of one or more related methods, properties, and/or events. Methods represent some action the object is to take such as Draw. The properties describe an object; that is, they represent the attributes or characteristics of an object. Events are methods that notify the rest of the system when something has happened relating to the object they are associated with. Interfaces then determine how clients of an object interact with and manipulate the object, as well as define what can and cannot be done with the object.

6. Conclusion and Future Extensions

The paper reported the development of the foundation of an interface to ArcMap intended for transportation network development and analysis using the integrated VBA development environment of ArcMap. The initial focus has been on frequently used TNM operations, which include network editing and analysis. The paper first identified the three-stage transportation modeling process (transportation network development and maintenance, Typical transportation network modeling process, and transportation network analysis) and describes the various processes involved at each stage. This was followed by the description of the interface developed, the development process, and the development environment which includes three levels of ArcInfo customization; menu-driven, VBA, and Object-Component programming. The aim of the interface is to simplify the frequently used TNM operations and allow personnel to quickly integrate into the unique problem solving operation of HGAC, which will save time and money on hiring house full of general purpose software expects, and will deliver precisely the tools needed.

The research, which is ongoing intends to extend the interface to a seamless integration with all the modules used in the transportation modeling process (section 2). This will enable all the three-stage process to take place via the interface, hence enabling files to be accessed interactively from the modules (ArcMap, Emme2, and M2probe). It is also intended to satisfy the target requirements stated in section 2.1, including automating the modeling processes.

References

Booth, B., 1999. Getting Started with ArcInfo. Environmental Systems Research Institute (Esri), Redlands, California.

Eylon, L., 2000. Intelligent Transportation Systems pave the way for the future. http://wwwgiscafe.com/GISVision/Feature/Intelligent_Transportation.html

Esri, 1999. ArcObjects Developer's Guide. Environmental Systems Research Institute (Esri), Redlands, California.

Onuogu, M., and Kudowor, A., 2000. The Modeling Group Network Interface Documentation. Houston-Galveston Area Council (HGAC), Transportation Department, Houston, Texas.


Andrew Y. Kudowor, Ph.D.
Technical Lead, Geomatics Research
GeoInfo Consultants