This document is archived and information here might be outdated. Recommended version. |
The measure domain extent.
[Visual Basic .NET]
Public Sub GetMDomain ( _
ByRef outMMin As Double, _
ByRef outMMax As Double _
)
[C#]
public void GetMDomain (
ref double outMMin,
ref double outMMax
);
[C++]
HRESULT GetMDomain(
System.Double* outMMin,
System.Double* outMMax
);
[C++] Parameters outMMin [out]
outMMin is a parameter of type double* outMMax [out]
outMMax is a parameter of type double*
An alternative method to the GetMFalseOriginAndUnits method. Returns the minimum and maximum allowed measure values for a spatial reference. Use GetMFalseOriginAndUnits to obtain the M precision (1/resolution) value.
//This code example shows how to get the M domain extent of a dataset.
//Make sure that a M domain exists
private void GetMDomain(IFeatureClass featureClass)
{
IGeoDataset geoDataset = featureClass as IGeoDataset;
//get access to SpatialReference through IGeoDataset
ISpatialReference spatialReference = geoDataset.SpatialReference;
//get the M domain extent of the dataset
double mMin;
double mMax;
spatialReference.GetMDomain(out mMin, out mMax);
System.Windows.Forms.MessageBox.Show(mMin + ", " + mMax);
}
'This code example shows how to get the M domain of a dataset.
'This example assumes that a valid workspace object has already been 'established.
Sub GetMDomain_Example(ByVal pWorkspace As IWorkspace)
Dim pFeatWS As IFeatureWorkspace
pFeatWS = pWorkspace
Dim pFeatDS As IFeatureDataset
pFeatDS = pFeatWS.OpenFeatureDataset("railroad")
Dim pGeoDataset As IGeoDataset
pGeoDataset = pFeatDS
'get access to SpatialReference through IGeoDataset
Dim pSpatRef As ISpatialReference
pSpatRef = pGeoDataset.SpatialReference
'dimension variables that will be used to store the
'M domain of the dataset
Dim dMmin As Double
Dim dMmax As Double
'get the M domain of the dataset
pSpatRef.GetMDomain(dMmin, dMmax)
Debug.Print(dMmin & ", ", dMmax)
End Sub