GIS Software Components: Examples Using OpenMap and MapObjects

Marco Morais


A short time after beginning to use a GIS you will come upon one of the most frustrating aspects of the industry, interoperability. As an example, you have some data from an organization that was given to you for incorporation into your own database. Unfortunately, the data is in a different format from the GIS software package you are using and it takes you twice as long as you expected to import the data into your own system.

To make matters even worse, the data is not imported to the level of detail and organization that it existed in the other software package. Enabling efficient transfer of information in situations like this one is one of the goals of interoperable data exchange formats. Software interoperability is concerned with many of the same issues as data exchange, except that the communication occurs directly between two or more pieces of software.

The ultimate goal of software components is to fuse the use of different pieces of software into one smoothly operating package. If this goal were realized you could, for example, buy a map-making tool from one company and a chart-making tool from another and combine them in order to include the two types of information in the final graphics you produce. GIS software components enable you to do this.

What are GIS software components?

Software components can be explained using an analogy to plumbing.  No matter what brand of pipes you own, you can go to the hardware store, buy another piece of pipe of the same diameter, and screw it into the pipe you already have.   Pipes from different companies fit together because each company has agreed to design the threads in a standard way.  

Free weekly newsletter

Fill out your e-mail address to receive our newsletter!

Using this analogy, you could build your own GIS software by “screwing together” a spatial data viewer component and a spatial data analysis component.   Unfortunately, unlike the plumbing industry, not all software components work together. 

The three most popular competing component standards, termed specifications, are CORBA, COM and JavaBeans.   Each standard has strengths and weaknesses; for example, COM will only work with Microsoft operating systems.   GIS software components have been designed using all three component specifications.  

Examples of GIS software components:

  • Autodesk ~ MapGuide
  • BBN Technologies ~ OpenMap
  • Blue Marble Geographics ~ GeoObjects
  • ESRI ~ MapObjects
  • MapInfo Corporation ~ MapX
  • ObjectFX ~ SpatialX

OpenMap: A Free GIS Software Component

OpenMap is a FREE JavaBeans software component for viewing spatial data. JavaBeans is a component specification for software written in the Java language.   In contrast to other GIS software components which offer both data viewing and analysis capabilities, OpenMap is primarily for data viewing and offers very little in the way of analysis functionality.  OpenMap supports viewing many different types and specifications of data including:

ESRI shapefiles
DCW (Digital Chart of the World)
VPF (Vector Product Format)
VMAP (Vector Map)
CADRG (Compressed Arc Digitized Raster Graphics)
CIB (Controlled Image Base)
RPF (Raster Product Format)

NIMA, the National Imagery and Mapping Agency have developed many of these data types and specifications. For more information on what NIMA is and what this agency does go to their FAQ site.   You can also access printed specifications of the NIMA formats listed above.   A sample application is included with the OpenMap distribution that you can use to view sample data as well as your own data.   In addition, all of the source code for OpenMap is included with the download from the OpenMap website.   Using the source code, you are free to modify OpenMap in any way you want provided you know how to program in Java and you give BBN Corporation, the developers of OpenMap, credit for any work you distribute.   This is a great way for you to add additional data format viewers or perhaps some analysis capabilities to OpenMap.

MapObjects: A Commercial Software Component

ESRI’s MapObjects is an Active X control, a subset of the COM component standard, for viewing, querying, and analyzing spatial data. Although the analysis capabilities available are not on par with a full-featured GIS package, the intention of the product is to provide enough functionality so that someone could embed mapping operations in a variety of non-GIS applications. In other words, if you are sending someone a word processing document and would like to include some maps that they can zoom around on and query as opposed to static images, then MapObjects can be used to accomplish this.

The most visible use of MapObjects to date has been to embed mapping capabilities into web browsers. For example, Jefferson County, Colorado has developed an address matching application that resides in a web browser using MapObjects. You can find some other demos here.

So how do you use MapObjects?

The operations that Active X controls, and COM components in general, expose can be programmed in a variety of languages and environments chosen by the user: Visual Basic, Visual C++, Java, and Delphi. This makes using these components much easier. At the heart of learning how to use MapObjects is the object diagram, think of this as blueprints for a programmer, that describes what operations are available and how they can be executed. You can view the MapObjects object diagram here, but with a warning that it is large (300kb). If you are interested in learning more about how to use MapObjects check out the ESRI Virtual Campus which offers free introductory courses on using MapObjects with Visual Basic. There are also some other resources listed below.What is source code?Software is usually delivered to users as an executable file, commonly given a .exe extension on Microsoft Windows computers, or as a shared non-executable library, commonly given a .dll extension on Microsoft Windows computers.   Before the executables or libraries are delivered, they exist in a human readable form.   This form is called source code.   Different computer languages, such as C, C++, Fortran, and Java, have different syntax and commands.   How readable the source code is will depend on how well you understand the programming language the source code has been written in.   Once you have the source code for an executable or shared library you can make changes and rebuild the executables or shared libraries to incorporate your changes.

Example of Java source code:

/* This method takes four integer arguments representing user mouse clicks on a map image * and converts the screen coordinates to real-world coordinates for requesting a new map * bounded by the four real-world coordinates. */ public void zoomIn(int X1, int Y1, int X2, int Y2) { //convert image to real-world coordinates double [] realWorldCoords = convertImageCoordsToRealWorld( X1, Y1, X2, Y2 ); if ( realWorldCoords == null) { if ( Debug.ON ) { Debug.log(“Error: image coordinates not converted to real world coordinates”); } return; } //request a new map with the appropriate real-world coordinates DblRectangle mapExtent = new DblRectangle(realWorldCoords[0], realWorldCoords[1], realWorldCoords[0], realWorldCoords [1]); String mapString = getMapString(mapExtent); getNewMap(mapString); if ( Debug.ON ) { Debug.log(“Status: returning from zoom in”); } return; }

Additional Resources:A good but very outdated (1997) book that covers this topic in detail is Focus on GIS Component Software: Featuring ESRI’s MapObjects written by Robert Hartman and published by Onward Press.

See Also

Photo of author
About the author
Marco Morais