org.gicentre.handy
Class Simplifier

java.lang.Object
  extended by org.gicentre.handy.Simplifier

public class Simplifier
extends java.lang.Object

Performs Douglas-Peucker simplification on linear coordinate collections.

Version:
1.0, 3rd January, 2012.
Author:
Jo Wood, giCentre, City University London.

Constructor Summary
Simplifier()
           
 
Method Summary
static float[] getSimplifiedX()
          Provides the simplified x coordinates.
static float[] getSimplifiedY()
          Provides the simplified y coordinates.
static void simplify(java.util.ArrayList<processing.core.PVector> origCoords, float tol)
          Creates a simplified version of the given collection of coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Simplifier

public Simplifier()
Method Detail

simplify

public static void simplify(java.util.ArrayList<processing.core.PVector> origCoords,
                            float tol)
Creates a simplified version of the given collection of coordinates. Uses Douglas-Peucker simplification using the given tolerance value. The greater the tolerance, the greater the simplification.

Parameters:
origCoords - Coordinates to be simplified.
tol - Douglas-Peucker tolerance (in spatial units).

getSimplifiedX

public static float[] getSimplifiedX()
Provides the simplified x coordinates. This should only be called after simplify().

Returns:
x coordinates of simplified line.

getSimplifiedY

public static float[] getSimplifiedY()
Provides the simplified y coordinates. This should only be called after simplify().

Returns:
y coordinates of simplified line.


handy V.1.0, API documentation generated 30th January, 2012