This document is archived and information here might be outdated. Recommended version. |
Sets the minimum tolerance (i.e., pre 9.2) used to determine equality of M values (2.0 * m resolution).
[Visual Basic .NET]
Public Sub SetMinimumMTolerance ( _
)
[C#]
public void SetMinimumMTolerance (
);
[C++]
HRESULT SetMinimumMTolerance(
void
);
2147220990 - FDO_E_INDEX_OUT_OF_RANGE
The spatial reference object's M-resolution is undefined (NaN). Use one of the methods on ISpatialReferenceResolution to define a resolution value before calling SetMinimumMTolerance.
The SetMinimumMTolerance method sets the tolerance to the value of the spatial reference's grid resolution (or 2.0 * M resolution). Setting the MTolerance 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 measure or linear referencing aware operations in the geometry system.
The following code snippet illustrates the required steps to set the minimum M 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.SetDefaultMResolution();
ISpatialReferenceTolerance spatialRefTolerance = spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetMinimumMTolerance();