ArcObjects Library Reference (Geometry)  

ISpatialReferenceTolerance.SetMinimumMTolerance Method

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
);

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 M-resolution is undefined (NaN).  Use one of the methods on ISpatialReferenceResolution to define a resolution value before calling SetMinimumMTolerance.

Remarks

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.

[C#]

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();

See Also

ISpatialReferenceTolerance Interface