[gdal-dev] curve fit question

Markus Neteler neteler at osgeo.org
Mon Aug 11 12:53:00 EDT 2008


On Mon, Aug 11, 2008 at 6:46 PM, Clay, Bruce <bclay at ball.com> wrote:
> Does anyone know of a function in GDAL or related libraries that given a set
> of points it will return a new set of points that is or can be used to
> create a smoothed polyline?  I have heard about things like linear fit and
> least squares but I have not used them and I am quite rusty on the math used
> to calculate a smoothed line from a set of points.  I have done a lot of web
> searching and found various generic algorithms but I don't see how to apply
> them.  For example a linear regression sample takes in a set of X-Y points
> but it only returns 3 values of C and standard deviation.

In the old v.digit of GRASS was a spline based curve smoother:
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_5_0/src/mapdev/v.digit/spline.c

Maybe interesting to look at.

Markus


More information about the gdal-dev mailing list