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


ISpatialReferenceTolerance.SetDefaultZTolerance Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceTolerance Interface > ISpatialReferenceTolerance.SetDefaultZTolerance Method
ArcGIS Developer Help

ISpatialReferenceTolerance.SetDefaultZTolerance Method

Sets the default value for the Z cluster tolerance used to control point coalescing strictly along the Z axis (the equivalent of 1 mm in the current vertical coordinate system units).

[Visual Basic .NET]
Public Sub SetDefaultZTolerance ( _
)
[C#]
public void SetDefaultZTolerance (
);
[C++]
HRESULT SetDefaultZTolerance(
void
);

Product Availability

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

Remarks

The SetDefaultZTolerance method establishes the default value for the ZTolerance.  Any established tolerance will not automatically be changed by changing the units of the spatial reference.  The default value is 1mm (scaled to whatever units are associated with the spatial reference's vertical coordinate system).

The minimum allowable ZTolerance is 2.0 * ZResolution

[C#]

The following code snippet illustrates the required steps to set the default Z tolerance for a new SpatialReference.

ISpatialReferenceFactory3 spatialReferenceFactory =
 
new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory3;

ISpatialReference spatialRef = spatialReferenceFactory.CreateSpatialReference(23033);
if (spatialRef == null)
return;

ISpatialReferenceResolution spatialRefResolution = spatialRef as ISpatialReferenceResolution;
// Set the domain extent to a default range based on the target resolution
spatialRefResolution.SetDefaultZResolution();

ISpatialReferenceTolerance spatialRefTolerance = spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetDefaultZTolerance();

 

See Also

ISpatialReferenceTolerance Interface

.NET Samples

Creating a toolbar of globe tools