BufferDistanceValidator class
Validates that a given buffer curve lies an appropriate distance from the input generating it. Useful only for round buffers (cap and join). Can be used for either positive or negative distances.
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.)
@author mbdavis
Constructors
- BufferDistanceValidator(Geometry input, double bufDistance, Geometry result)
Properties
- bufDistance ↔ double
-
getter/setter pair
- errMsg ↔ String?
-
getter/setter pair
- errorIndicator ↔ Geometry?
-
getter/setter pair
- errorLocation ↔ Coordinate?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- input ↔ Geometry
-
getter/setter pair
- maxDistanceFound ↔ double
-
getter/setter pair
- maxValidDistance ↔ double
-
getter/setter pair
- minDistanceFound ↔ double
-
getter/setter pair
- minValidDistance ↔ double
-
getter/setter pair
- result ↔ Geometry
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkMaximumDistance(
Geometry input, Geometry bufCurve, double maxDist) → void - Checks that the furthest distance from the buffer curve to the input is less than the given maximum distance. This uses the Oriented Hausdorff distance metric. It corresponds to finding the point on the buffer curve which is furthest from some point on the input.
-
checkMinimumDistance(
Geometry g1, Geometry g2, double minDist) → void - Checks that two geometries are at least a minimum distance apart.
-
checkNegativeValid(
) → void -
checkPositiveValid(
) → void -
getErrorIndicator(
) → Geometry? - Gets a geometry which indicates the location and nature of a validation failure.
-
getErrorLocation(
) → Coordinate? -
getErrorMessage(
) → String? -
getPolygonLines(
Geometry g) → Geometry -
isValid(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- MAX_DISTANCE_DIFF_FRAC → double
-
Maximum allowable fraction of buffer distance the
actual distance can differ by.
1% sometimes causes an error - 1.2% should be safe.
final
- VERBOSE ↔ bool
-
getter/setter pair