ArcObjects Library Reference (Geometry)  

ISpatialReferenceTolerance.SetMinimumZTolerance Method

Sets the minimum value for the Z cluster tolerance (i.e., pre 9.2) 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 SetMinimumZTolerance ( _
)
[C#]
public void SetMinimumZTolerance (
);
[C++]
HRESULT SetMinimumZTolerance(
void
);

Product Availability

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

Errors Returned

2147220990 -  FDO_E_INDEX_OUT_OF_RANGE

The spatial reference object's Z-resolution is undefined (NaN).  Use one of the methods on ISpatialReferenceResolution to define a resolution value before calling SetMinimumZTolerance.

Remarks

The SetMinimumZTolerance method sets the ZTolerance to 2.0 * z resolution. Setting the ZTolerance using this method provides a mechanism to maintain backward compatibility with ArcGIS 9.1 geometric and relational operators. At 9.1 and before, this is the only tolerance value used by the geometric and relational operators.

The ZResolution should be defined before calling SetMinimumZTolerance.

 

[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.SetMinimumZTolerance();

See Also

ISpatialReferenceTolerance Interface