Class BufferResultValidator
Validates that the result of a buffer operation is geometrically correct, within a computed tolerance.
Inherited Members
Namespace: NetTopologySuite.Operation.Buffer.Validate
Assembly: NetTopologySuite.dll
Syntax
public class BufferResultValidator
Remarks
This is a heuristic test, and may return false positive results (I.e. it may fail to detect an invalid result.) It should never return a false negative result, however (I.e. it should never report a valid result as invalid.)
This test may be (much) more expensive than the original buffer computation.
Constructors
| Edit this page View SourceBufferResultValidator(Geometry, double, Geometry)
Declaration
public BufferResultValidator(Geometry input, double distance, Geometry result)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | input | |
| double | distance | |
| Geometry | result |
Fields
| Edit this page View SourceVerbose
Declaration
public static bool Verbose
Field Value
| Type | Description |
|---|---|
| bool |
Properties
| Edit this page View SourceErrorIndicator
Gets a geometry which indicates the location and nature of a validation failure.
If the failure is due to the buffer curve being too far or too close to the input, the indicator is a line segment showing the location and size of the discrepancy.
Declaration
public Geometry ErrorIndicator { get; }
Property Value
| Type | Description |
|---|---|
| Geometry | A geometric error indicator |
ErrorLocation
Gets the error location
Declaration
public Coordinate ErrorLocation { get; }
Property Value
| Type | Description |
|---|---|
| Coordinate |
ErrorMessage
Gets the error message
Declaration
public string ErrorMessage { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceIsValid()
Declaration
public bool IsValid()
Returns
| Type | Description |
|---|---|
| bool |
IsValid(Geometry, double, Geometry)
Declaration
public static bool IsValid(Geometry g, double distance, Geometry result)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | |
| double | distance | |
| Geometry | result |
Returns
| Type | Description |
|---|---|
| bool |
IsValidMessage(Geometry, double, Geometry)
Checks whether the geometry buffer is valid, and returns an error message if not.
Declaration
public static string IsValidMessage(Geometry g, double distance, Geometry result)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | g | |
| double | distance | |
| Geometry | result |
Returns
| Type | Description |
|---|---|
| string | An appropriate error message |