question: private boolean isErodedCompletely ( LinearRing ring , double bufferDistance ) { Coordinate [ ] ringCoord = ring . getCoordinates ( ) ; double minDiam = 0.0 ; if ( ringCoord . length < 4 ) return bufferDistance < 0 ; if ( ringCoord . length == 4 ) return isTriangleErodedCompletely ( ringCoord , bufferDistance ) ; Envelope env = ring . getEnvelopeInternal ( ) ; double envMinDimension = Math . min ( env . getHeight ( ) , env . getWidth ( ) ) ; if ( bufferDistance < 0.0 && 2 * Math . abs ( bufferDistance ) > envMinDimension ) return true ; return false ; }
target:  The ringCoord is assumed to contain no repeated points. It may be degenerate (i.e. contain only 1, 2, or 3 points). In this case it has no area, and hence has a minimum diameter of 0.