com.vividsolutions.jcs.geom
Class BufferDistancePerturber

java.lang.Object
  extended bycom.vividsolutions.jcs.geom.BufferDistancePerturber

public class BufferDistancePerturber
extends java.lang.Object

Improves the robustness of buffer computation by using small perturbations of the buffer distance. Also used enhanced precision.


Constructor Summary
BufferDistancePerturber(double distance, double maximumPerturbation)
           
 
Method Summary
 com.vividsolutions.jts.geom.Geometry buffer(com.vividsolutions.jts.geom.Geometry geom)
          Attempts to compute a buffer using small perturbations of the buffer distance if necessary.
static com.vividsolutions.jts.geom.Geometry safeBuffer(com.vividsolutions.jts.geom.Geometry geom, double distance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferDistancePerturber

public BufferDistancePerturber(double distance,
                               double maximumPerturbation)
Method Detail

safeBuffer

public static com.vividsolutions.jts.geom.Geometry safeBuffer(com.vividsolutions.jts.geom.Geometry geom,
                                                              double distance)

buffer

public com.vividsolutions.jts.geom.Geometry buffer(com.vividsolutions.jts.geom.Geometry geom)
Attempts to compute a buffer using small perturbations of the buffer distance if necessary. If this routine is unable to perform the buffer computation correctly the orginal buffer exception will be propagated.

Parameters:
geom - the Geometry to compute the buffer for
Returns:
the buffer of the input Geometry