MapGuide API Reference
|
virtual MgCoordinate* MgCoordinateSystemMeasure::GetCoordinate | ( | double | xStart, |
double | yStart, | ||
double | azimuth, | ||
double | distance | ||
) | [pure virtual] |
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(double lon, double lat, double azimuth, double distance); |
virtual MgCoordinate GetCoordinate(double lon, double lat, double azimuth, double distance); |
virtual MgCoordinate GetCoordinate(double lon, double lat, double azimuth, double distance); |
xStart | (double) The x value in coordinate system units of the starting coordinate. |
yStart | (double) The y value in coordinate system units of the starting coordinate. |
azimuth | (double) An azimuth (Angle with respect to the North) that defines the direction of the vector. |
distance | (double) The distance along the vector to the desired coordinate in meters. |
$coord12 = $coordSysMeasure->GetCoordinate(-74.806394, 40.714169, $azimuth12, $distance); $coord21 = $coordSysMeasure->GetCoordinate(-71.061342, 42.355892, $azimuth21, $distance);
using OSGeo.MapGuide; private MgCoordinateSystemMeasure geogCSMeasure; private MgCoordinate geogCSX1Y1Coord; private double geogCSX = -160.101421317; private double geogCSY = 22.0234263273; private double geogCSX1 = -159.721535121256; private double geogCSY1 = 24.0028259520524; private double geogCSAzimuth = 10.0; private double geogCSDistance = 2.0; private double tolerance = 0.001; private Boolean isEquivalent; geogCSX1Y1Coord = geogCSMeasure.GetCoordinate(geogCSX, geogCSY, geogCSAzimuth, geogCSDistance); // the X and Y values of geogCSX1Y1Coord are equal to geogCSX1 and geogCSY1 isEquivalent = Math.Abs(geogCSX1 - geogCSX1Y1Coord.GetX()) < tolerance && Math.Abs(geogCSY1 - geogCSX1Y1Coord.GetY()) < tolerance;
MgCoordinateSystemMeasureFailedException |