com.bbn.openmap.omGraphics
Class NatCubicSpline

java.lang.Object
  extended by com.bbn.openmap.omGraphics.NatCubicSpline
Direct Known Subclasses:
NatCubicClosedSpline, NatCubicSpline.CLOSED

public class NatCubicSpline
extends java.lang.Object

A natural cubic spline calculation.

Version:
21 juil. 2002
Author:
Eric LEPICIER
See Also:
Splines

Nested Class Summary
static class NatCubicSpline.CLOSED
          Moved from an outside class, the closed case of a NatCubicSpline.
 
Constructor Summary
NatCubicSpline()
           
 
Method Summary
 double[] calc(double[] llpoints, double precision)
          Calculates a float lat/lon cubic spline
static double[] calc(double[] llpoints, double precision, boolean geometryClosed)
          The proper access for these classes, using default steps.
static double[] calc(double[] llpoints, double precision, boolean geometryClosed, int steps)
          The proper access for these classes.
 float[][] calc(float[] xpoints, float[] ypoints)
          Calculates a cubic spline polyline
static float[][] calc(float[] xpoints, float[] ypoints, boolean geometryClosed)
          The proper access for these classes, using default steps.
static float[][] calc(float[] xpoints, float[] ypoints, boolean geometryClosed, int steps)
          The proper access for these classes.
 float[][] calc(int[] xpoints, int[] ypoints)
          Calculates a cubic spline polyline
static float[][] calc(int[] xpoints, int[] ypoints, boolean geometryClosed)
          The proper access for these classes, using default steps.
static float[][] calc(int[] xpoints, int[] ypoints, boolean geometryClosed, int steps)
          The proper access for these classes.
 int getSteps()
          Returns the steps.
 void setSteps(int steps)
          Sets the number of points (steps) interpolated on the curve between the original points to draw it as a polyline.
 NatCubicSpline withSteps(int steps)
          Set the steps and return this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NatCubicSpline

public NatCubicSpline()
Method Detail

calc

public static float[][] calc(int[] xpoints,
                             int[] ypoints,
                             boolean geometryClosed)
The proper access for these classes, using default steps.

Parameters:
xpoints - projected x points
ypoints - projected y points
geometryClosed - whether the spline is a closed shape
Returns:

calc

public static float[][] calc(int[] xpoints,
                             int[] ypoints,
                             boolean geometryClosed,
                             int steps)
The proper access for these classes.

Parameters:
xpoints - projected x points
ypoints - projected y points
geometryClosed - whether the spline is a closed shape
steps - the number of segments the spline curve should be broken into (default 12)
Returns:

calc

public static float[][] calc(float[] xpoints,
                             float[] ypoints,
                             boolean geometryClosed)
The proper access for these classes, using default steps.

Parameters:
xpoints - projected x points
ypoints - projected y points
geometryClosed - whether the spline is a closed shape
Returns:

calc

public static float[][] calc(float[] xpoints,
                             float[] ypoints,
                             boolean geometryClosed,
                             int steps)
The proper access for these classes.

Parameters:
xpoints - projected x points
ypoints - projected y points
geometryClosed - whether the spline is a closed shape
steps - the number of segments the spline curve should be broken into (default 12)
Returns:

calc

public static double[] calc(double[] llpoints,
                            double precision,
                            boolean geometryClosed)
The proper access for these classes, using default steps.

Parameters:
llpoints -
precision -
geometryClosed - whether the spline is a closed shape
Returns:

calc

public static double[] calc(double[] llpoints,
                            double precision,
                            boolean geometryClosed,
                            int steps)
The proper access for these classes.

Parameters:
llpoints -
precision -
geometryClosed - whether the spline is a closed shape
steps - the number of segments the spline curve should be broken into (default 12)
Returns:

calc

public float[][] calc(int[] xpoints,
                      int[] ypoints)
Calculates a cubic spline polyline

Parameters:
xpoints -
ypoints -
Returns:
float[][]

calc

public float[][] calc(float[] xpoints,
                      float[] ypoints)
Calculates a cubic spline polyline

Parameters:
xpoints - in float precision.
ypoints - in float precision.
Returns:
float[][]

calc

public double[] calc(double[] llpoints,
                     double precision)
Calculates a float lat/lon cubic spline

Parameters:
llpoints -
precision - for dividing floating coordinates to become int, e.g 0.01 means spline to be calculated with coordinates * 100
Returns:
float[]

getSteps

public int getSteps()
Returns the steps.

Returns:
int

setSteps

public void setSteps(int steps)
Sets the number of points (steps) interpolated on the curve between the original points to draw it as a polyline.

Parameters:
steps - The steps to set

withSteps

public NatCubicSpline withSteps(int steps)
Set the steps and return this object.

Parameters:
steps -
Returns:
this


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details