R
RolfK
Dear ALL,
does anybody have a solution for this:
I have a set of points (you can imagine a poly line) decribed this
way.
<?xml version="1.0" encoding="UTF-8"?>
<Line>
<P X="10" Y="1.0"/>
<P X="20" Y="2.1"/>
<P X="30" Y="2.2"/>
<P X="40" Y="4.3"/>
<P X="50" Y="4.4"/>
<P X="60" Y="3.5"/>
</Line>
What I want is to create a function which returns the Y value based on
an X value.
Easy, in case the X value exists. If not, I have to search the 2
nearest points and next calculate Y.
I can assume that the X value is in the range of Xmin and Xmax of the
point data set.
What is the best code (XSLT2.0) to find the two nearest points for a
given X ?
(I have the feeling that a for-each-group may do, but this may be
wrong)
Any help is welcome
Rolf
does anybody have a solution for this:
I have a set of points (you can imagine a poly line) decribed this
way.
<?xml version="1.0" encoding="UTF-8"?>
<Line>
<P X="10" Y="1.0"/>
<P X="20" Y="2.1"/>
<P X="30" Y="2.2"/>
<P X="40" Y="4.3"/>
<P X="50" Y="4.4"/>
<P X="60" Y="3.5"/>
</Line>
What I want is to create a function which returns the Y value based on
an X value.
Easy, in case the X value exists. If not, I have to search the 2
nearest points and next calculate Y.
I can assume that the X value is in the range of Xmin and Xmax of the
point data set.
What is the best code (XSLT2.0) to find the two nearest points for a
given X ?
(I have the feeling that a for-each-group may do, but this may be
wrong)
Any help is welcome
Rolf