internal static double CalculateToleranceFromGeometry(com.epl.geometry.SpatialReference sr, com.epl.geometry.Envelope2D env2D, bool bConservative) { double gtolerance = env2D._calculateToleranceFromEnvelope(); double stolerance = sr != null?sr.GetTolerance(com.epl.geometry.VertexDescription.Semantics.POSITION) : 0; if (bConservative) { gtolerance *= 4; stolerance *= 1.1; } return(System.Math.Max(stolerance, gtolerance)); }