Saturday, May 16, 2009

Exploiting the ESRI Projection Engine (second edition)

Late last year we created a .NET wrapper for the ESRI projection engine (PE).  The PE is a C DLL that is used by many ESRI products like ArcGIS Engine, ArcGIS Desktop, ArcGIS Explorer and also Adobe Acrobat Reader 9.  Click here to read the previous post.

The wrapper has been extended to include two more functions and comes with a test application. Additionally, code was added to safely unload the PE DLL to reduce the risk of memory leaks.  The source code (include test application) can be downloaded from here on ArcScripts.

Below is a screenshot demonstrating the PE function that computes the geodesic distance (and azimuth) between two geographic locations.

The next screenshot demonstrates another PE function that computes a location on an ellipsoid based using a distance and azimuth from a known location.

The last screenshot demonstrates a PE function that performs a geographic transformation.  For a list of preset geographic transformations please visit one of following links (#1, #2 or #3).  In the example below, a coordinate based on the Ain El Adb ellipsoid is transformed to the WGS84 ellipsoid.

No comments:

Post a Comment

Post a Comment