Esempio n. 1
0
        /// <summary>
        /// Computes the buffer of a geometry for a given buffer distance.
        /// </summary>
        /// <param name="g">The geometry to buffer.</param>
        /// <param name="distance">The buffer distance.</param>
        /// <returns>The buffer of the input geometry.</returns>
        public static Geometry Buffer(Geometry g, double distance)
        {
            BufferOp gBuf    = new BufferOp(g);
            Geometry geomBuf = gBuf.Buffer(distance);

            return(geomBuf);
        }
Esempio n. 2
0
        /// <summary>
        /// Computes the buffer for a geometry for a given buffer distance
        /// and accuracy of approximation.
        /// </summary>
        /// <param name="g">The geometry to buffer.</param>
        /// <param name="distance">The buffer distance.</param>
        /// <param name="quadrantSegments">
        /// The number of segments used to approximate a quarter circle.
        /// </param>
        /// <param name="capStyle">
        /// The end cap style of the generated buffer.
        /// </param>
        /// <returns>
        /// The buffer of the input geometry.
        /// </returns>
        public static Geometry Buffer(Geometry g, double distance,
                                      int quadrantSegments, BufferCapType capStyle)
        {
            BufferOp bufOp   = new BufferOp(g, capStyle, quadrantSegments);
            Geometry geomBuf = bufOp.Buffer(distance);

            return(geomBuf);
        }
Esempio n. 3
0
        /// <summary>
        /// Computes the buffer of a geometry for a given buffer distance.
        /// </summary>
        /// <param name="g">The geometry to buffer.</param>
        /// <param name="distance">The buffer distance.</param>
        /// <param name="capStyle">
        /// The end cap style of the generated buffer.
        /// </param>
        /// <returns>The buffer of the input geometry.</returns>
        public static Geometry Buffer(Geometry g, double distance,
                                      BufferCapType capStyle)
        {
            BufferOp gBuf    = new BufferOp(g, capStyle);
            Geometry geomBuf = gBuf.Buffer(distance);

            return(geomBuf);
        }