コード例 #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);
        }
コード例 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="container"></param>
 public PrecisionReducerCoordinateOperation(SimpleGeometryPrecisionReducer container)
 {
     _container = container;
 }