Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some graph work, I need the value of X,y tolerance. I found ISpatialReferenceTolerance.XYTolerance Property. But I couldn't find any option that how can I get ISpatialReferenceTolerance interface from the map? Can anybody give me some pointer?


share|improve this question
up vote 2 down vote accepted
    double GetXyTolerance()
        var map = ArcMap.Document.FocusMap;
        var spatialRef = map.SpatialReference;
        if (spatialRef!=null && spatialRef.HasXYPrecision())
            var spRefTolerance = spatialRef as ISpatialReferenceTolerance;
            if (spRefTolerance != null && spRefTolerance.XYToleranceValid == esriSRToleranceEnum.esriSRToleranceOK)
                return spRefTolerance.XYTolerance;
        return -1.0;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.