ArcObjects Library Reference (Geometry)  

ISpatialReference.GetMFalseOriginAndUnits Method

Get the measure false origin and units.

[Visual Basic .NET]
Public Sub GetMFalseOriginAndUnits ( _
    ByRef falseM As Double, _
    ByRef mUnits As Double _
)
[C#]
public void GetMFalseOriginAndUnits (
    ref double falseM,
    ref double mUnits
);
[C++]
HRESULT GetMFalseOriginAndUnits(
  double* falseM,
  double* mUnits
);
[C++]

Parameters

falseM [out]   falseM is a parameter of type double mUnits [out]   mUnits is a parameter of type double

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

An alternative method to the GetMDomain method. The falseM value corresponds to the minimum measure value of the measure domain. The mUnits is the same as the precision or scale value. The inverse of the mUnits defines the resolution of the measure data stored in the geodatabase. The resolution is used to snap data when it is stored in the geodatabase.

[C#]
//This code example shows how to get the M false origin and units of a dataset
//Make sure that the features in the featureClass contain falseM values
private void GetMFalseOriginAndUnits(IFeatureClass featureClass)
{
  IGeoDataset geoDataset = featureClass as IGeoDataset;
  //get access to SpatialReference through IGeoDataset 
  ISpatialReference spatialReference = geoDataset.SpatialReference;
  //get the M false origin and units of the dataset 
  double falseM;
  double mUnits;
  spatialReference.GetMFalseOriginAndUnits(out falseM, out mUnits);
  System.Windows.Forms.MessageBox.Show(falseM + ", " + mUnits);
}  
[Visual Basic .NET]

    'This code example shows how to get the M false origin and units of a 'dataset.
    'This example assumes that a valid workspace object has already 'been established.
    Sub GetMFalseOriginAndUnits_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 false origin and units of the dataset
        Dim dFalseM As Double
        Dim dMUnits As Double
        'get the M false origin and units of the dataset
        pSpatRef.GetMFalseOriginAndUnits(dFalseM, dMUnits)
        Debug.Print(dFalseM & ", " & dMUnits)
    End Sub

See Also

ISpatialReference Interface