Esempio n. 1
0
        /// <summary>
        /// 
        /// </summary>
        private void BufferReducedPrecision()
        {
            // try and compute with decreasing precision
            for (int precDigits = MaxPrecisionDigits; precDigits >= 0; precDigits--)
            {
                try
                {
                    BufferReducedPrecision(precDigits);
                }
                catch (TopologyException ex)
                {
                    saveException = ex;
                    // don't propagate the exception - it will be detected by fact that resultGeometry is null
                }
                if (resultGeometry != null) 
                    return;
            }

            // tried everything - have to bail
            throw saveException;
        }
Esempio n. 2
0
 /// <summary>
 /// 
 /// </summary>
 private void BufferOriginalPrecision()
 {
     try 
     {
         BufferBuilder bufBuilder = new BufferBuilder();
         bufBuilder.QuadrantSegments = quadrantSegments;
         bufBuilder.EndCapStyle = endCapStyle;
         resultGeometry = bufBuilder.Buffer(argGeom, distance);
     }
     catch (TopologyException ex) 
     {
         saveException = ex;
         // don't propagate the exception - it will be detected by fact that resultGeometry is null
     }
 }