SGImplify
Class SGImplify

java.lang.Object
  extended by SGImplify.SGImplify

public class SGImplify
extends java.lang.Object

SGImplify is a polyline simplification tool using the Douglas-Peucker algorithm.


Constructor Summary
SGImplify()
           
 
Method Summary
static Tuple.Tuple2f[] simplifyLine2D(float tol, Tuple.Tuple2f[] V)
          This method will reduce a 2D complex polyline.
static Tuple.Tuple3f[] simplifyLine3D(float tol, Tuple.Tuple3f[] V)
          This method will reduce a 3D complex polyline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SGImplify

public SGImplify()
Method Detail

simplifyLine2D

public static Tuple.Tuple2f[] simplifyLine2D(float tol,
                                             Tuple.Tuple2f[] V)
This method will reduce a 2D complex polyline.

Parameters:
tol - the tolerance of the reduction algorithm. Higher numbers will simplify the line more.
V - the array of Tuple2fs to be simplified
Returns:
an array of Tuple2f representing the simplified polyline

simplifyLine3D

public static Tuple.Tuple3f[] simplifyLine3D(float tol,
                                             Tuple.Tuple3f[] V)
This method will reduce a 3D complex polyline.

Parameters:
tol - the tolerance of the reduction algorithm. Higher numbers will simplify the line more.
V - the array of Tuple3f to be simplified
Returns:
an array of Tuple3f representing the simplified polyline