isLineOffsetEmpty method
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
@param distance the offset curve distance @return true if the offset curve is empty
Implementation
bool isLineOffsetEmpty(double distance) {
// a zero width buffer of a line or point is empty
if (distance == 0.0) return true;
// a negative width buffer of a line or point is empty,
// except for single-sided buffers, where the sign indicates the side
if (distance < 0.0 && ! bufParams.isSingleSided) return true;
return false;
}