This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReference Interface > ISpatialReference.GetZDomain Method (ArcObjects .NET 10.5 SDK) |
The Z domain extent.
[Visual Basic .NET] Public Sub GetZDomain ( _ ByRef outZMin As Double, _ ByRef outZMax As Double _ )
[C#] public void GetZDomain ( ref double outZMin, ref double outZMax );
[C++]
HRESULT GetZDomain(
double* outZMin,
double* outZMax
);
[C++]
Parameters outZMin [out] outZMin is a parameter of type double outZMax [out] outZMax is a parameter of type double
An alternative method to the GetZFalseOriginAndUnits method. Returns the minimum and maximum allowed Z values for a spatial reference. Use GetZFalseOriginAndUnits to obtain the Z precision (1/resolution) value.
//This code example shows how to get the Z domain extent of a dataset.
private void GetZDomain(IFeatureClass featureClass)
{
IGeoDataset geoDataset=featureClass as IGeoDataset;
//get access to SpatialReference through IGeoDataset
ISpatialReference spatialReference=geoDataset.SpatialReference;
//get the Z domain extent of the dataset
double zMin;
double zMax;
spatialReference.GetZDomain(out zMin, out zMax);
System.Windows.Forms.MessageBox.Show(zMin + ", " + zMax);
}
'This code example shows how to get the Z domain extent of a dataset.
'This example assumes that a valid workspace object has already been 'established.
Sub GetZDomain_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 domain extent of
'the dataset
Dim dZmin As Double
Dim dZmax As Double
'get the Z domain extent of the dataset
pSpatRef.GetZDomain(dZmin, dZmax)
Debug.Print(dZmin & ", " & dZmax)
End Sub