com.bbn.openmap.util
Class FanCompress.FloatCompress
java.lang.Object
com.bbn.openmap.util.FanCompress
com.bbn.openmap.util.FanCompress.FloatCompress
- Enclosing class:
- FanCompress
public static class FanCompress.FloatCompress
- extends FanCompress
FanCompress class for float values.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
array
protected double[] array
zero_eps
protected double zero_eps
FanCompress.FloatCompress
public FanCompress.FloatCompress(double[] array)
- Construct a FanCompress object which deals in floats.
- Parameters:
array
- float[] array of coordinate pairs.
next_point
public boolean next_point(FanCompress.FanPoint p)
- Get the next point.
- Specified by:
next_point
in class FanCompress
- Parameters:
p
- FanPoint
- Returns:
- boolean false if no more points.
save_point
public void save_point(double x,
double y)
- Save coordinates. This routine coalesces adjacent points
which have the same coordinates.
- Specified by:
save_point
in class FanCompress
- Parameters:
x
- coordinatey
- coordinate
set_coalesce_points
public void set_coalesce_points(double epsilon)
- Save only unique coordinates. If several points are the
same, then coalesce them into one point.
- Specified by:
set_coalesce_points
in class FanCompress
- Parameters:
epsilon
- threshold used to determine uniqueness of
coordinates.
getArray
public double[] getArray()
- Return a copy of the internal array. Invoke this method
after running
fan_compress()
on this object.
- Returns:
- float[]
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details