Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="precisionDigits"></param>
        private void BufferFixedPrecision(int precisionDigits)
        {
            double sizeBasedScaleFactor = PrecisionScaleFactor(_argGeom, _distance, precisionDigits);

            PrecisionModel fixedPm = new PrecisionModel(sizeBasedScaleFactor);

            // don't change the precision model of the Geometry, just reduce the precision
            SimpleGeometryPrecisionReducer reducer = new SimpleGeometryPrecisionReducer(fixedPm);
            IGeometry reducedGeom = reducer.Reduce(_argGeom);

            BufferBuilder bufBuilder = new BufferBuilder();
            bufBuilder.WorkingPrecisionModel = fixedPm;
            bufBuilder.QuadrantSegments = _quadrantSegments;

            // this may throw an exception, if robustness errors are encountered
            _resultGeometry = bufBuilder.Buffer(reducedGeom, _distance);
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="container"></param>
 public PrecisionReducerCoordinateOperation(SimpleGeometryPrecisionReducer container)
 {
     _container = container;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="container"></param>
 public PrecisionReducerCoordinateOperation(SimpleGeometryPrecisionReducer container)
 {
     _container = container;
 }