/// <summary>
        /// Computes the buffer of a point for a given buffer distance,
        /// using the given Cap Style for borders of the point.
        /// </summary>
        /// <param name="g">The point to buffer.</param>
        /// <param name="distance">The buffer distance.</param>
        /// <param name="endCapStyle">Cap Style to use for compute buffer.</param>
        /// <returns> The buffer of the input point.</returns>
        public static IGeometry Buffer(Geometry g, double distance, BufferStyles endCapStyle)
        {
            BufferOp gBuf = new BufferOp(g);

            gBuf.EndCapStyle = endCapStyle;
            IGeometry geomBuf = gBuf.GetResultGeometry(distance);

            return(geomBuf);
        }
        /// <summary>
        /// Computes the buffer for a point for a given buffer distance
        /// and accuracy of approximation.
        /// </summary>
        /// <param name="g">The point 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="endCapStyle">Cap Style to use for compute buffer.</param>
        /// <returns>The buffer of the input point.</returns>
        public static IGeometry Buffer(IGeometry g, double distance, int quadrantSegments, BufferStyles endCapStyle)
        {
            BufferOp bufOp = new BufferOp(g);

            bufOp.EndCapStyle      = endCapStyle;
            bufOp.QuadrantSegments = quadrantSegments;
            IGeometry geomBuf = bufOp.GetResultGeometry(distance);

            return(geomBuf);
        }
Beispiel #3
0
 /// <summary>
 /// Computes the buffer for a point for a given buffer distance
 /// and accuracy of approximation.
 /// </summary>
 /// <param name="g">The point 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="endCapStyle">Cap Style to use for compute buffer.</param>
 /// <returns>The buffer of the input point.</returns>
 public static IGeometry Buffer(IGeometry g, double distance, int quadrantSegments, BufferStyles endCapStyle)
 {
     BufferOp bufOp = new BufferOp(g);
     bufOp.EndCapStyle = endCapStyle;
     bufOp.QuadrantSegments = quadrantSegments;
     IGeometry geomBuf = bufOp.GetResultGeometry(distance);
     return geomBuf;
 }
Beispiel #4
0
 /// <summary>
 /// Computes the buffer of a point for a given buffer distance,
 /// using the given Cap Style for borders of the point.
 /// </summary>
 /// <param name="g">The point to buffer.</param>
 /// <param name="distance">The buffer distance.</param>        
 /// <param name="endCapStyle">Cap Style to use for compute buffer.</param>
 /// <returns> The buffer of the input point.</returns>
 public static IGeometry Buffer(Geometry g, double distance, BufferStyles endCapStyle)
 {
     BufferOp gBuf = new BufferOp(g);
     gBuf.EndCapStyle = endCapStyle;
     IGeometry geomBuf = gBuf.GetResultGeometry(distance);
     return geomBuf;
 }
Beispiel #5
0
 /// <summary>
 /// Returns a buffer region around this <c>Geometry</c> having the given width.
 /// The buffer of a Geometry is the Minkowski sum or difference of the Geometry with a disc of radius <c>distance</c>.
 /// </summary>
 /// <param name="distance">
 /// The width of the buffer, interpreted according to the
 /// <c>PrecisionModel</c> of the <c>Geometry</c>.
 /// </param>
 /// <param name="endCapStyle">Cap Style to use for compute buffer.</param>
 /// <returns>
 /// All points whose distance from this <c>Geometry</c>
 /// are less than or equal to <c>distance</c>.
 /// </returns>
 public virtual IGeometry Buffer(double distance, BufferStyles endCapStyle)
 {
     return BufferOp.Buffer(this, distance, endCapStyle);
 }
Beispiel #6
0
 /// <summary>
 /// Returns a buffer region around this <c>Geometry</c> having the given
 /// width and with a specified number of segments used to approximate curves.
 /// The buffer of a Geometry is the Minkowski sum of the Geometry with
 /// a disc of radius <c>distance</c>.  Curves in the buffer polygon are
 /// approximated with line segments.  This method allows specifying the
 /// accuracy of that approximation.
 /// </summary>
 /// <param name="distance">
 /// The width of the buffer, interpreted according to the
 /// <c>PrecisionModel</c> of the <c>Geometry</c>.
 /// </param>
 /// <param name="quadrantSegments">The number of segments to use to approximate a quadrant of a circle.</param>
 /// <param name="endCapStyle">Cap Style to use for compute buffer.</param>
 /// <returns>
 /// All points whose distance from this <c>Geometry</c>
 /// are less than or equal to <c>distance</c>.
 /// </returns>
 public virtual IGeometry Buffer(double distance, int quadrantSegments, BufferStyles endCapStyle)
 {
     return BufferOp.Buffer(this, distance, quadrantSegments, endCapStyle);
 }