Library dependencies: System, SystemUI, Geometry, Display, Server, Output, Geodatabase, GISClient, ArcWeb, DataSourcesFile, DataSourcesGDB, DataSourcesOleDB, DataSourcesRaster, DataSourcesNetCDF, GeoDatabaseDistributed, GeoDatabaseExtensions, CartoAdditional library information: Contents,
Object Model Diagram
- Engine with Military Analyst
- ArcView with Military Analyst
- ArcEditor with Military Analyst
- ArcInfo with Military Analyst
The MilitaryAnalyst library implements the non-user interface functionality of the Military Analyst extension. It contains objects used for converting coordinates, creating geodetically correct geometric objects, creating and displaying Military Analyst (MA) layers in ArcGIS, and controlling the GeoSym Renderer.The objects that implement this functionality are grouped into a number of library subsystems. These library subsystems are:
object is the engine behind the Military Analyst Coordinate tool and the Convert Coordinates in File command in ArcMap. It allows you to convert coordinates from and to decimal degree, Degrees Minutes Seconds (DMS), universal transverse Mercator (UTM), and Military Grid Reference System (MGRS) formats, as well as from one datum to another.
CoordinateTool implements a single interface: ICoordinateTool
. ICoordinateTool provides three methods: ConvertLocation
, and GetDatumEllipsoid
. ConvertLocation is the key method, as it is the one used for coordinate conversion. Two of the parameters to note for ConvertLocation are vFromDatum and vToDatum, the input and output datums, respectively, for the coordinate conversion. The values passed into these parameters can either be a string representing the name of the datum or a long representing the index of the datum in the coordinate tool's datum list. GetDatumList returns a string array listing the datum strings that are supported by the ConvertLocation method. It can also be used to return the datum name string at a given index. The list returned by GetDatumList is the same as the Datum drop-down list in the Military Analyst Coordinate Tool dialog box in ArcMap. GetDatumEllipsoid returns the ellipsoid, also known as the spheroid, used by a specified datum.
The following diagram details the ICoordinateTool interface:
The Geodesy application programming interface (API) provides objects for measuring geodesic, rhumb line, and great circle distances, creating geodetically correct geometric objects, and creating dynamic graphic element representations of these geometries for display. The Geodesy API is the engine behind the Military Analyst Geodesy Calculator, Geodesy Graphic tool, and Range Rings tool in ArcMap. The Geodesy library can be further divided into three subsections: MeasurementTool, GeoGeometry, and GeoElements.
coclass implements a single interface, IMeasurementTool
, that provides methods used for calculating geodesic, great circle, and rhumb line distances. Geodesics represent the shortest distance between two points on a spheroid; great circles represent the shortest distance between two points on a sphere; and rhumb lines, also known as loxodromes, are lines of constant azimuth. Incidentally, rhumb lines are always straight lines in a Mercator projection.
The following diagram details the IMeasurementTool interface:
IMeasurementTool can either be used to calculate the distance and azimuth values of a line based on input start and end points, by utilizing the ConstructByPoints
method, or to calculate the end point of a line based on input start point, distance, and azimuth values, by utilizing the ConstructByPointDistAngle
method. In either case, the spatial reference of the input IPoint
must be specified before they are passed to the particular construct method.
The SpecialGeolineType property must be set after the particular construct method is called.
You can also return IPolyline
representing the geoline created by the construct method using the Polyline
property on IMeasurementTool. IPolyline will be densified by the number of vertices specified on the property. This polyline geometry can then be stored in a feature, or displayed as a graphic, or used in any other operation where such a geometry is relevant.
Additional methods on IMeasurementTool include GetCoordinate
. GetCoordinate returns IPoint at a specified location, as a percentage of the total distance of a geoline, along the geoline.
The GeoGeometry coclasses include GeoPolyline
, and GeoEllipse
. These objects allow for the construction of geodetically correct, spatial reference-aware versions of standard polyline and polygon geometries. They also work directly with the geoelement objects for display as dynamic graphic elements.
The GeoPolyline coclass implements the IGeoPolyline
interface, which provides members for the creation of special polyline geometries that represent geodesic, great circle, and rhumb lines. This is different from IMeasurementTool, which should be used to measure geodesic, great circle, and rhumb line distances. IGeoPolyline is focused solely on the generation of the special polyline geometries for their representation in a graphic element or a feature.
The first step in creating a geopolyline is to define a two-point polyline, which will provide the start and end points of the geopolyline. The input polyline must have a spatial reference defined for it. The correct ISpatialReference must also be specified for IGeoPolyline.BaseSpatialReference
, as this is critical to the construction of the geopolyline. If the BaseSpatialReference is not set, it will default to esriSRGeoCS_WGS1984.
The type of GeoPolyline to be created is determined by the SpecialGeolineType
property, which uses the cjmtkSGType enumeration. Additional properties controlling the number of intermediate vertices generated between the start and end points of the GeoPolyline can be specified as well. These are the MaxPercent
properties. With the MaxPercent property, a percentage of the total distance of the line can be specified, and a vertex point will be placed along the line at distance intervals corresponding to this value. In other words, if a value of 0.1, or 10 percent, is specified, nine vertices will be created, dividing the line into ten segments. The MaxStepSize property defines the maximum distance in meters between vertices along the line. If neither MaxPercent nor MaxStepSize is specified, then MaxPercent will be used and will default to a value of 0.05, or 5 percent.
The following diagram details the IGeoPolyline interface:
property on IGeoPolyline returns IPolyline representing the special geoline version of the original input two-point polyline. This polyline geometry can be stored in a feature or used in any other operation where such a geometry is relevant.
The GeoPolygon coclass implements the IGeoPolygon
interface, which provides members for the creation of special polygon geometries whose constituent segments are composed of geodesic lines, great circle lines, and rhumb lines. IGeoPolygon provides many of the same members as IGeoPolyline, and its usage is similar as well. As with IGeoPolyline, the purpose of IGeoPolygon is to generate special polygon geometries for their representation in a graphic element or a feature.
The first step in creating a GeoPolygon is to define an input Polygon, which will provide the base geometry of the GeoPolygon. The input Polygon must have a spatial reference defined for it. The correct ISpatialReference must also be specified for IGeoPolygon.BaseSpatialReference
, as this is critical to the construction of the GeoPolygon. If BaseSpatialReference is not set, it will default to esriSRGeoCS_WGS1984.
property determines the type of geoline (geodesic, great circle, or rhumb line) by which the GeoPolygon's segments will be represented. The MaxPercent
properties function the same as the properties on IGeoPolyline; thus the description of them above applies here as well. The EnhancedPolygon
property also has the same usage as the IGeoPolyline.EnhancedPolyline property; see the description of it in the previous section. The code examples for IGeoPolyline also apply to IGeoPolygon. Simply replace polyline with polygon in all cases.
The following diagram details the IGeoPolygon interface:
The GeoEllipse coclass implements the IGeoEllipse
interface, which provides members for the creation of special elliptical polygons. As with the other GeoGeometry objects, the first step in creating a GeoEllipse is to define an input geometry that will form the basis of the GeoEllipse. In this case, the input geometry is IPoint that represents the origin, or center point, of the GeoEllipse. IPoint must have a defined spatial reference. The point is passed to GeoEllipse via the IGeoEllipse.Origin
property. The GeoEllipse must also have ISpatialReference defined and set via the BaseSpatialReference
property. The default is esriSRGeoCS_WGS1984.
The GeoEllipse dimensions are controlled by the AxisX
properties, which define the lengths, in meters, of the GeoEllipse X axis and Y axis respectively. Optionally GeoEllipse can be rotated by passing in a value for the Rotation
property. The Rotation value is a double that specifies a rotation angle in degrees from north for the Y axis of the GeoEllipse. The last of the properties that needs to be defined for GeoEllipse is GeoEllipsePointCount
, which, like the nNumberPoints parameter on IMeasurementTool.Polyline, defines the number of vertices by which to densify the GeoEllipse polygon.
The following diagram details the IGeoEllipse interface:
The object created by IGeoEllipse is the GeoEllipse itself, which can be passed as the geometry to GeoEllipseElement
for depiction as a graphic element. The IGeoEllipse.Polygon
property refers to the IPolygon representation of the GeoEllipse, which can be stored in a feature or used in any other operation where such a geometry is relevant. A third entity that can be generated from the input properties is IGeoEllipse.KeyPoints
, which is a four-point IPolygon with points at the ends of the GeoEllipse axes.
The GeoElement coclasses include GeoPolylineElement
, and GeoEllipseElement
. These are special dynamic graphic elements whose source geometry is provided by GeoGeometry objects (GeoPolylines for GeoPolylineElements, GeoPolygons for GeoPolygonElements, and GeoEllipses for GeoEllipseElements). These objects are dynamic in the sense that their shape updates automatically when they are moved from one location to another, or if the map spatial reference is changed. See the following illustrations for an example of the dynamic nature of GeoEllipseElement.
As GeoEllipseElement is moved, its GeoEllipse geometry is recalculated based on the new location of the origin point. Thus, it maintains its spatial accuracy regardless of its geographic location or the spatial reference of the map.
MALayers has the following coclasses:
object is a custom layer used to draw Military Analyst digital terrain elevation data (DTED) catalogs in ArcMap or a Map Control. It allows you to draw the catalog with a custom Uniform Renderer, set the display resampling method, and display a color-coded wireframe. The MADtedLayer coclass implements the following interfaces:
– DisplayElevation, if set to true, will draw all the dataset tiles in the catalog.
– InternalObject returns the layer as a raster catalog.
– ResamplingType sets the raster resampling method used to draw the individual tiles.
– UseUniformRenderer will set a custom stretch renderer across all tiles so the catalog will appear as if it were one single dataset.
– Setup is the core method. It takes ITable of a DTED catalog and builds MADtedLayer. The returned Boolean is true if layer initialization is successful.
object is a custom layer used to draw Military Analyst Raster Product Format (RPF) catalogs in ArcMap or a Map Control. The MARasterLayer coclass has the following interfaces:
- IMADatasets—This interface and its properties are the same as those for MADtedLayer, described in the previous section.
IMARasterLayer—This interface is the core of MARasterLayer and sets the catalog table for the layer. It also controls the resampling and display of the individual dataset tiles. IMARasterLayer has the following properties and methods: DisplayRasters, InternalObject, ResamplingType, UseBestMap, and Setup.
- DisplayRasters, if set to true, will draw the tiles of the selected products.
- InternalObject returns the raster catalog of the layer.
- ResamplingType sets the raster resampling for the dataset tiles.
- UseBestMap will draw the best RPF product based on the display scale. As the scale changes (Zoom In, Zoom Out) the product displayed will change.
- Setup implements the layer.
- IWireframeDisplayProps—This interface and its property are the same as those for MADtedLayer, described in the previous section.
The GeoSym Renderer API provides objects for symbolizing feature data in ArcGIS according to the GeoSym specification. GeoSym is the standard that defines how Vector Product Format (VPF) data is to be symbolized. The GeoSymRenderer
class is the only class available in the API, and it implements a single interface—IGSGeoSymRenderer
. Additionally, there are two other interfaces available in the API: IGSGeoSymRenderer2