[Java-collab] Re: Cubic splines in GML

Andrei Ionita ionita at lat-lon.de
Thu Aug 20 04:45:18 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again numerical-methods enthusiasts,

For the ones interested in an answer to my previous mail, I've found a
document that presents a math algorithm to deduce the spline (given the
control points and starting/ending tangents - actually called "clamped
cubic spline").
http://persson.berkeley.edu/128A/lec14-2x3.pdf

There is one more ambiguity though. The GML 3.1.1 schema states that
vectorStart and vectorEnd correspond to the first and last point
respectively.

According to the algorithm pointed above, the first point needs to have
the minimum x-value and the last point the maximum x-value.

What happens if the points given are in no order whatsoever on the x
axis? Already I'm fearing that might be the case, as an example I found
(in the Ron Lake book) puts three points (-2,0), (-4,0) and (-6,1) in
descending order (on X).

Any thoughts on this? I hope I didn't lose you in details... Anyway, if
I don't get any answers I will just expect the points are given in
ascending/descending order. (I seem to remember the cubic splines from
my college classes to have been defined with each point "on the right"
of the previous one).

Cheers,

Andrei


Andrei Ionita wrote:
> Hi everyone,
> 
> I am seeking help on understanding the concept that GML is defining for
> cubic splines.
> 
> Firstly, I have been looking at the GML definition of cubic splines and
> wondering how to interpret it. There, a cubic spline consist of control
> points and starting and ending tangent vectors. It appears as the
> piecewise cubic polynomials (that are defined mathematically for a cubic
> spline) can be deduced from the two tangents, but how does one do that?
> 
> Or is the target of the GML type not one of defining a rigorous math object?
> 
> Apart from that however, I would also like to ask if some of you has
> ever stumbled upon a discrete algorithm for interpolating cubic
> splines, or at least can give me some literature references.
> 
> In the meantime I found the GeoTools page
> http://docs.codehaus.org/display/GEOTDOC/01+How+to+Create+a+Geometry#01HowtoCreateaGeometry-Splines(arcswithmathsgalore)
> 
> that contains an implementation. I will need to study the algorithm from
> there a bit, but it looks good.
> 
> Any suggestion on the subject would be appreciated. Thanks!
> 
> Regards,
> Andrei

- --
Andrei Ionita

l a t / l o n  GmbH
Aennchenstrasse 19               53177 Bonn, Germany
phone ++49 +228 18496-0          fax ++49 +228 18496-29
http://www.lat-lon.de            http://www.deegree.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqNDRsACgkQ4pb290eLCNss8gCdFjW33YmReDsVqDtMfjIrXMYA
G7cAn2s9F1MURcTrtoLrrR0SBYuYpNVh
=XQK7
-----END PGP SIGNATURE-----


More information about the Java-collab mailing list