Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

# MgCoordinateSystemMeasure Class Reference
[MgCoordinateSystemMeasure]

Provides operations for measuring the distance between 2 coordinates and the azimuth of 2 coordinates as well as calculating a coordinate position given an initial coordinate, an azimuth, and a distance. More...

Inherits MgMeasure.

List of all members.

## Public Member Functions
virtual double | GetAzimuth (double x1, double y1, double x2, double y2)=0
| Computes the angle with respect to the north of a vector formed by two coordinates.
virtual double | GetAzimuth (MgCoordinate *coord1, MgCoordinate *coord2)=0
| Computes the angle with respect to north of a vector formed by two coordinates.
virtual MgCoordinate * | GetCoordinate (double xStart, double yStart, double azimuth, double distance)=0
| Computes a coordinate a given distance along a vector that is defined by a starting coordinate and an azimuth (Angle with respect to the North).
virtual MgCoordinate * | GetCoordinate (MgCoordinate *coord, double azimuth, double distance)=0
| Computes a coordinate given a distance along a vector that is defined by a starting coordinate and an azimuth (Angle with respect to the North).
virtual double | GetDistance (double x1, double y1, double x2, double y2)=0
| Computes the distance between two coordinates.
virtual double | GetDistance (MgCoordinate *coord1, MgCoordinate *coord2)=0
| Computes the distance between two coordinates.
virtual MgEnvelope * | GetEnvelope ()=0
| Computes the envelope of the MgCoordinateSystemMeasure object.

## Detailed Description

Provides operations for measuring the distance between 2 coordinates and the azimuth of 2 coordinates as well as calculating a coordinate position given an initial coordinate, an azimuth, and a distance.

Remarks:
  If the coordinate system supports it, the ellipsoid definition is used in the operations.
  To verify that the operations yield correct results, do the following:
  1. get the distance between 2 coordinate.
  2. get azimuth12, the azimuth from coordinate1 to coordinate2
  3. get azimuth21,the azimuth from coordinate2 to coordinate1
  4. get coordinate12, given coordinate1, azimuth12 and distance; coordinate 12 should be the same as coordinate2
  5. get coordinate21, given coordinate2, azimuth21 and distance; coordinate 21 should be the same as coordinate1

Comments or suggestions? Send us feedback.