Source Code

The GeoEngineCom source code is available for download. You will also need to download the Windows Developer version of GeoTrans 2.4 from the National Geospatial-Intelligence Agency.

*** GeoEngineCOM is written for GeoTrans 2.4 and will need to be updated for the newer GeoTrans 2.4.2 that was recently released ***

The source code is provided without any warranties of any kind. As usual, use it at your own risk.

Windows Release Build Available

A Win32 binary release build can be downloaded from and used if your not interested in the source code.

About GeoEngineCom

Not long ago I needed to support transformation between coordinate projections used throughout the world. Lots of libraries are available, but none fit my needs of being reusable with Java, C++, and .NET. Most of all, the library had to be well tested and would not produce errors if used correctly (can't do anything about producing errors when used the wrong way).

GeoTrans from the National Geospatial Intelligence Agency (NGA) is what I decided to use. The NGA source code is written in C and available on their website. I didn't want to port and support the code to each of the languages that needed to be supported, nor did I want to introduce errors to any of the computations. In order to accomplish the goals I decided to wrap all GeoTrans functionality in ActiveX.

This turned out to be fairly simple, but extremely tedious. Each structure, enum, function, etc. needed to be included in the IDL, and function signatures needed to be changed to support IDL and COM.

Compiling GeoEngineCom

There are a number of steps that need to be performed before the code will compile correctly.

  1. Download GeoTrans 2.4 and unzip to a project directory of your choice.
  2. Download the source code for GeoEngineCom and unzip the contents into the project directory of GeoTrans. The directory tree should look like the following:
GeoEngineCom Picture
  1. Prepare DT_CC and Engine for compiling:
    1. The projects included in the Win directories of DT_CC and Engine of GeoTrans is for an earlier version of MSVS. When opening in MSVS 2005 you’ll be prompted to update the projects. Click the “yes to all� button.
    2. Both DT_CC and Engine projects will need the “Additional include directories� fixed up. Just copy the debug version of this setting to the release version.
    3. The release version of Engine has an erroneous entry for “Additional Options� under the “C/C++ -> Command line� properties. Remove the entry completely.
    4. The release version of DT_CC needs LITTLE_ENDIAN added to the pre-processor directive.
    5. For the Engine project add these entries to the project properties
      1. Additional Library Directories: ..\..\dt_cc\win
      2. Additional Dependencies: dtcc.lib
  2. Compile DT_CC win project first, then the Engine win project.
  3. Once successfully compiled the Win directory of DT_CC and Engine will each contain a LIB file.
  4. Open the GeoEngineCom solution.
    1. Rebuild the solution. You will see many warning about MIDL2368. These can safely be ignored. Any errors will need to be fixed. If you see a bunch of unresolved external errors then you probably forgot to perform step 3d above.
  5. After successfully compiling GeoEngineCom there will be a GeoEngineCom.dll file and a GeoEngineCom.tlb file. These are the files that you build and distribute with your applications. You will also need to run RegSrv32 on GeoEngineCom.dll.