The docs have something for spline:
public Geometry splineInterpolatePoints(double[] xPoints, double[] yPoints) {
/* * First we create a LineString of segments with the * input points as
vertices. */ final int N = xPoints.length; Coordinate[] coords = new
Coordinate[N]; for (int i = 0; i < N; i++) { coords[i] = new
Coordinate(xPoints[i], yPoints[i]); } GeometryFactory gf = new
GeometryFactory(); LineString line = gf.createLineString(coords); /* * Now we
use the GeoTools JTS utility class to smooth the * line. The returned Geometry
will have all of the vertices * of the input line plus extra vertices tracing a
spline * curve. The second argument is the 'fit' parameter which * can be in
the range 0 (loose fit) to 1 (tightest fit). */ return JTS.smooth(line, 0.0); }
If you set the range to 1 it should be basically linear.
--
Jody Garnett
On Saturday, 4 June 2011 at 4:57 AM, Mike O'Toole wrote:
> Hi all,
>
> Is there support in GeoTools for the interpolation of a specified points
> value given 4 other points with values? I have been looking at the
> org.geotools.filter.function.InterpolateFunction Class. However, it does not
> seem to support the input I need. If this is possible will someone please
> share a quick example.
>
> Thanks!
>
> Mike
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users