Geodesy MapControl


PurposeThe Geodesy MapControl sample is a standalone ArcGIS Engine application that shows how to create and display GeoEllipse, GeoPolygon, and GeoPolyline objects in a MapControl. These objects are spheroidal geometries, and can be displayed as GeoEllipseElement, GeoPolygonElement, and GeoPolylineElement graphic objects. This sample also shows how to determine geodesic, great circle, and rhumb line distances using IMeasurementTool.

How to use

If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

Using the Motif C++ and GTK C++ implementations
  1. Use the Makefile provided to make the project.
  2. Run the application and open an mxd project
  3. To create a GeoEllipseElement, in the GeoEllipse frame enter the coordinates of the center point in the X and Y fields; enter values for the axis lengths in the X Axis and Y Axis fields; enter a rotation value (in degrees); and click the Draw GeoEllipse button.
  4. To create a GeoPolylineElement, in the GeoPolyLine frame select the type of GeoPolyline to create in the Type dropdown list. Then enter the coordinates (in decimal degrees) for the Start and End points in the X and Y fields and click the Draw GeoLine button.
  5. To create a GeoPolygonElement, right-click in the map to add the vertices of the GeoPolygon, then double-right-click to close the polygon.
  6. Use the Select tool to select the GeoElements and drag them to different locations in the map. Note that the shapes of the graphics update when they are moved, as the geometry is recalculated based on the new location.

Using the Qt C++ implementation
  1. Run this command from this sample directory to generate pro file: qmake -project
  2. Run this command to generate Makefile : qmake
  3. Open Makefile and add ESRI_UNIX flag to CXXFLAGS: CXXFLAGS = -pipe -g -Wall -W -DESRI_UNIX -D_REENTRANT $(DEFINES)
  4. Add ARCENGINEHOME/include directory to INCPATH: INCPATH = -I$(ARCENGINEHOME)/include -I/usr/local/Trolltech...
  5. Add ARCENGINEHOME's lib and bin directories and dependent libraries (-larcsdk -lqt4ctl -laoctl -ldefensesolutionssdk) to LIBS as shown: LIBS = $(SUBLIBS) -L$(ARCENGINEHOME)/lib -L$(ARCENGINEHOME)/bin -L/usr/local/Trolltech/Qt-4.1.3/lib -lQtGui_debug -L/home/molebuild/qt-x11-opensource-src-4.1.3/lib -L/usr/X11R6/lib -lpng -larcsdk -lqt4ctl -laoctl -ldefensesolutionssdk -lSM -lICE -lXi -lXrender -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore_debug -lz -lm -ldl -lpthread
  6. Run make command.
  7. Run the application and open an mxd project
  8. To create a GeoEllipseElement, in the GeoEllipse frame enter the coordinates of the center point in the X and Y fields; enter values for the axis lengths in the X Axis and Y Axis fields; enter a rotation value (in degrees); and click the Draw GeoEllipse button.
  9. To create a GeoPolylineElement, in the GeoPolyLine frame select the type of GeoPolyline to create in the Type dropdown list. Then enter the coordinates (in decimal degrees) for the Start and End points in the X and Y fields and click the Draw GeoLine button.
  10. To create a GeoPolygonElement, right-click in the map to add the vertices of the GeoPolygon, then double-right-click to close the polygon.
  11. Use the Select tool to select the GeoElements and drag them to different locations in the map. Note that the shapes of the graphics update when they are moved, as the geometry is recalculated based on the new location.

Geodesy.cpp Main implementation file
Geodesy.h Header file
MapControlEvents.cpp Implementation of custom MapControl events class
MapControlEvents.h Header file
Makefile.SolarisMotif Solaris Project Makefile
Makefile.LinuxMotif Linux Project Makefile
Download the Motif_CPP files
Geodesy.cpp Main implementation file
MapControlEvents.cpp Custom MapControl events class
MapControlEvents.h Header file
Makefile.SolarisGTK Solaris Project Makefile
Makefile.LinuxGTK Linux Project Makefile
Download the GTK_CPP files
Main.cpp Main file
Geodesy.cpp File that contains implementation code
Geodesy.h Header file
MapControlEvents.cpp Custom MapControl events class
MapControlEvents.h Header file
Makefile.SolarisQT Solaris Project Makefile
Makefile.LinuxQT Linux Project Makefile
NMakefile.mak Windows Makefile
Download the QT_CPP files

Download the files for all languages




Additional Requirements
  • QT implementation requires QT4

Development licensing Deployment licensing
Engine Developer Kit: Military Analyst Engine Runtime: Military Analyst