## 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.

Nested Class Summary

Nested classes inherited from class com.bbn.openmap.util.FanCompress
`FanCompress.FanPoint, FanCompress.FloatCompress`

Field Summary
`protected float[]` `array`
`protected float` `zero_eps`

Constructor Summary
`FanCompress.FloatCompress(float[] array)` Construct a FanCompress object which deals in floats.

Method Summary
`float[]` `getArray()` Return a copy of the internal array.
`boolean` `next_point(FanCompress.FanPoint p)` Get the next point.
`void` `save_point(double x, double y)` Save coordinates.
`void` `set_coalesce_points(double epsilon)` Save only unique coordinates.

Methods inherited from class com.bbn.openmap.util.FanCompress
`fan_compress`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### array

    protected float[] array

### zero_eps

    protected float zero_eps

Constructor Detail

### FanCompress.FloatCompress

    public FanCompress.FloatCompress(float[] array)

  Construct a FanCompress object which deals in floats.

Parameters:
  `array` - float[] array of coordinate pairs.

Method Detail

### 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` - coordinate
    `y` - 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 float[] 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