Class OffsetCurveBuilder
Computes the raw offset curve for a single Geometry component (ring, line or point). A raw offset curve line is not noded - it may contain self-intersections (and usually will).g The final buffer polygon is computed by forming a topological graph of all the noded raw curves and tracing outside contours. The points in the raw curve are rounded to a given PrecisionModel.
Inherited Members
Namespace: NetTopologySuite.Operation.Buffer
Assembly: NetTopologySuite.dll
Syntax
public class OffsetCurveBuilder
Constructors
| Improve this Doc View SourceOffsetCurveBuilder(PrecisionModel, BufferParameters)
Declaration
public OffsetCurveBuilder(PrecisionModel precisionModel, BufferParameters bufParams)
Parameters
Type | Name | Description |
---|---|---|
PrecisionModel | precisionModel | |
BufferParameters | bufParams |
Properties
| Improve this Doc View SourceBufferParameters
Gets the buffer parameters being used to generate the curve.
Declaration
public BufferParameters BufferParameters { get; }
Property Value
Type | Description |
---|---|
BufferParameters |
Methods
| Improve this Doc View SourceGetLineCurve(Coordinate[], Double)
This method handles single points as well as LineStrings. LineStrings are assumed not to be closed (the function will not fail for closed lines, but will generate superfluous line caps).
Declaration
public Coordinate[] GetLineCurve(Coordinate[] inputPts, double distance)
Parameters
Type | Name | Description |
---|---|---|
Coordinate[] | inputPts | The vertices of the line to offset |
Double | distance | The offset distance |
Returns
Type | Description |
---|---|
Coordinate[] | A Coordinate array representing the curve |
GetOffsetCurve(Coordinate[], Double)
Declaration
public Coordinate[] GetOffsetCurve(Coordinate[] inputPts, double distance)
Parameters
Type | Name | Description |
---|---|---|
Coordinate[] | inputPts | |
Double | distance |
Returns
Type | Description |
---|---|
Coordinate[] |
GetRingCurve(Coordinate[], Position, Double)
This method handles the degenerate cases of single points and lines, as well as rings.
Declaration
public Coordinate[] GetRingCurve(Coordinate[] inputPts, Position side, double distance)
Parameters
Type | Name | Description |
---|---|---|
Coordinate[] | inputPts | |
Position | side | |
Double | distance |
Returns
Type | Description |
---|---|
Coordinate[] | A Coordinate array representing the curve |
GetRingCurve(Coordinate[], Positions, Double)
This method handles the degenerate cases of single points and lines, as well as rings.
Declaration
[Obsolete("Use GetRingCurve(Coordinate[], Geometries.Position, double)")]
public Coordinate[] GetRingCurve(Coordinate[] inputPts, Positions side, double distance)
Parameters
Type | Name | Description |
---|---|---|
Coordinate[] | inputPts | |
Positions | side | |
Double | distance |
Returns
Type | Description |
---|---|
Coordinate[] | A Coordinate array representing the curve |
IsLineOffsetEmpty(Double)
Tests whether the offset curve for line or point geometries at the given offset distance is empty (does not exist). This is the case if:
- the distance is zero
- the distance is negative, except for the case of singled-sided buffers
Declaration
public bool IsLineOffsetEmpty(double distance)
Parameters
Type | Name | Description |
---|---|---|
Double | distance | The offset curve distance |
Returns
Type | Description |
---|---|
Boolean |
|