MapGuide API Reference
|
virtual MgEnvelope* MgCoordinateSystemMeasure::GetEnvelope | ( | ) | [pure virtual] |
Computes the envelope of the MgCoordinateSystemMeasure object.
virtual MgEnvelope GetEnvelope(); |
virtual MgEnvelope GetEnvelope(); |
virtual MgEnvelope GetEnvelope(); |
$envelope = $coordSysMeasure->GetEnvelope(); $lowerLeft = $envelope->GetLowerLeftCoordinate(); $upperRight = $envelope->GetUpperRightCoordinate(); $width = $envelope->GetWidth(); $height = $envelope->GetHeight(); $depth = $envelope->GetDepth();
using OSGeo.MapGuide; private MgGeometryFactory geometryFactory; private MgEnvelope geogCSEnvelope; private double geogCSMaxX = 180; private double geogCSMaxY = 90; private double geogCSMinX = -180; private double geogCSMinY = -90; private MgCoordinate lowerLeft; private MgCoordinate upperRight; private double tolerance = 0.001; private Boolean isEquivalent; envelope = geogCSMeasure.GetEnvelope(); lowerLeft = envelope.GetLowerLeftCoordinate(); upperRight = envelope.GetUpperRightCoordinate(); // the lower left and upper right coordinates of the envelope are equal to the coordinate system's lower left and upper right coordinates isEquivalent = Math.Abs(geogCSMinX - lowerLeft.GetX()) < tolerance && Math.Abs(geogCSMinY - lowerLeft.GetY()) < tolerance; isEquivalent = Math.Abs(geogCSMaxX - upperRight.GetX()) < tolerance && Math.Abs(geogCSMaxY - upperRight.GetY()) < tolerance;
MgCoordinateSystemMeasureFailedException |