ArcObjects Library Reference (DefenseSolutions)  

IMeasurementTool Interface

Provides access to members that perform measurements along Geolines between two points.

Product Availability

Available with ArcGIS Engine and ArcGIS Desktop.

Description

IMeasurementTool can either be used to calculate the distance and azimuth values of a Geoline based on input start and end points, by utilizing the ConstructByPoints method; or to calculate the end point of a Geoline based on input start point, distance, and azimuth values, by utilizing the ConstructByPointDistAngle method. In either case, the spatial reference of the input IPoints must be specified before they are passed to the particular Construct method. An ISpatialReference must also be defined for the IMeasurementTool::SpecialSpatialReference property, because the results of the Construct methods are dependent on the input spheroid, which is inherent to ISpatialReference. If the SpecialSpatialReference is not defined explicitly, it will default to esriSRGeoCS_WGS1984. The SpecialGeolineType property defines the type of Geoline (geodesic, great circle, or rhumb line) that will be constructed, using the cjmtkSGType enumeration. Note that the SpecialGeolineType property must be set after the Construct method is called.

You can also return an IPolyline representing the Geoline created by the Construct method using the Polyline property on IMeasurementTool. The 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.

Members

Description
Read/write property Accuracy Property Accuracy (not implemented).
Read/write property Angle Angle at FromPoint of Geoline connecting ToPoint (degrees, clockwise from north.
Method ConstructByPointDistAngle Computes properties of Geoline object using the FromPoint, Distance, and Angle.
Method ConstructByPoints Computes properties of Geoline object using the FromPoint and ToPoint.
Read/write property Distance Distance along a Geoline between the FromPoint and ToPoint.
Read/write property FromPoint Start point for measurements along a Geoline.
Method GetCoordinate Compute coordinates of point along Geoline between the FromPoint and ToPoint.
Method PathDistance Compute the sum of distances obtained by measuring between the input geometry's point collection.
Read-only property Polyline Polyline representation of Geoline joining ToPoint and FromPoint.
Read-only property ReverseAngle Angle at ToPoint of Geoline connecting FromPoint in degrees, clockwise from north.
Read/write property SpecialGeolineType Type of Geoline, joining FromPoint and ToPoint, along which measurements are made.
Read/write property SpecialSpatialReference The Spatial Reference defining the datum for computing coordinates along Geoline.
Read/write property ToPoint End point for measurements along a Geoline.

CoClasses that implement IMeasurementTool

CoClasses and Classes Description
MeasurementTool A collection of methods for geodesy computations.

.NET Snippets

Get Azimuth from Two Points | Get Distance from Two Points |

.NET Samples

Geodesy MapControl (Code Files: GeodesyMapControl) |