This document is archived and information here might be outdated.  Recommended version.


ISpatialReference.GetZFalseOriginAndUnits Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

ISpatialReference.GetZFalseOriginAndUnits Method

Get the Z false origin and units.

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

Parameters falseZ [out] falseZ is a parameter of type double zUnits [out] zUnits is a parameter of type double

Product Availability

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

Description

An alternative method to the GetZDomain method. The falseZ value corresponds to the minimum Z value of the Z domain. The zUnits is the same as the precision or scale value. The inverse of the zUnits defines the resolution of the z 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 Z false origin and units of a dataset
//Make sure that the features in the featureClass contain falseZ values
private void GetZFalseOriginAndUnits(IFeatureClass featureClass)
{
    IGeoDataset geoDataset=featureClass as IGeoDataset;
    //get access to SpatialReference through IGeoDataset
    ISpatialReference spatialReference=geoDataset.SpatialReference;
    //get the Z false origin and units of the dataset
    double falseZ;
    double zUnits;
    spatialReference.GetZFalseOriginAndUnits(out falseZ, out zUnits);
    System.Windows.Forms.MessageBox.Show(falseZ + ", " + zUnits);
}

[Visual Basic .NET]

    'This code example shows how to get the Z false origin and units of a 'dataset.
    'This example assumes that a valid workspace object has already 'been established.
    Sub GetZFalseOriginAndUnits_Example(ByRef 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
        'Z false origin and units of the dataset

        Dim dFalseZ As Double
        Dim dZUnits As Double

        'get the Z false origin and units of the dataset

        pSpatRef.GetZFalseOriginAndUnits(dFalseZ, dZUnits)
        Debug.Print(dFalseZ & ", " & dZUnits)
    End Sub

See Also

ISpatialReference Interface | ISpatialReferenceResolution Interface