W3C home > Mailing lists > Public > www-math@w3.org > September 2008

content markup newbie questions

From: Rushforth, Peter <prushfor@NRCan.gc.ca>
Date: Wed, 17 Sep 2008 15:26:17 -0400
Message-ID: <E3942D3EB127854BBBC18511759DD0030135493A@S0-OTT-X2.nrn.nrcan.gc.ca>
To: <www-math@w3.org>

Greetings,

 

Not sure if this list will accept rich email like this, but I'll give it a try.

 

I'm trying to encode the equations below for Lambert Conformal Conic (2 std parallels) into

content markup, and thence to use xslt to generate equivalent xslt functions.

 

I have taken a stab at the content markup, but I'm not sure if I'm on the right track, could you give me a couple of pointers please. 

 

First,  the equations for easting and northing are quite deeply nested definitions.  I am wondering if one should

try to define csymbol elements for each sub-element, and then reference those csymbols where appropriate.  Or perhasp those re-usable pieces should be fn elements (although this seems to be deprecated?).

 

You can see that there are effectively function definitions which could be re-used, for example the definition of t can be used to calculate t1, t2, tF and t by substituting various values of phi.  Likewise for m, n, and F.

 

 

Here's what I'm trying to encode:

 

Easting,    E  = EF + r sin q

Northing, N = NF + rF -  r cos q 

 

where   m = cosj/(1 -  e2sin2j) 0.5 for m1, j1, and m2, j2 where j1  and j2 are the latitudes of 

                        the standard parallels

            t  = tan(p/4 -  j/2)/[(1 -  e sinj)/(1 + e sinj)] e/2 for t1, t2, tF and t using j1, j2, jF and j             

                                    respectively

            n = (ln m1 -  ln m2)/(ln t1 -  ln t2)

            F = m1/(nt1n)

            r =  a F tn         for rF and r, where rF is the radius of the parallel of latitude of the false origin

            q = n(l -  lF)

 

The reverse formulas to derive the latitude and longitude of a point from its Easting and Northing values are:

            j = p/2 -  2atan{t'[(1 -  esinj)/(1 + esinj)]e/2}

            l = q'/n +lF

where

            r' = {(E -  EF) 2 + [rF -  (N -  NF)] 2}0.5, taking the sign of n

            t' = (r'/(aF))1/n

            q' = atan [(E -  EF)/(rF -  (N -  NF))]

and n, F, and rF are derived as for the forward calculation.
 
Here's the result for the Easting and Northing, respectively, haven't tried going too much further yet, as I think I might be going down the wrong track with declare?:
 
I can say that I've tested what this looks like in firefox with appropriate fonts installed etc., and it doesn't look like I'm doing anything right.  I use the stylesheets referenced by the http://www.w3.org/Math/XSL/csmall2.xml document to transform my content to presentation and it doesn't look like I'm capturing what I want to.
 
<math xmlns="http://www.w3.org/1998/Math/MathML">

<declare type="function" nargs="2">
<apply>
<plus/>
<ci>
<msub>
<mi>E</mi>
<mi>F</mi>
</msub>
</ci>
<apply>
<times/>
<ci>r</ci>
<apply>
<sin/>
<ci>theta</ci>
</apply>
</apply>
</apply>
<apply/>
</declare>

<declare type="function" nargs="2">
<apply>
<plus/>
<ci>
<msub>
<mi>N</mi>
<mi>F</mi>
</msub>
</ci>
<apply>
<minus/>
<ci>
<msub>
<mi>r</mi>
<mi>F</mi>
</msub>
</ci>
<apply>
<times/>
<ci>r</ci>
<apply>
<cos/>
<ci>theta</ci>
</apply>
</apply>
</apply>
</apply>
</declare>
</math>
 
Thanks for any advice.
 
Cheers,
Peter
Received on Wednesday, 17 September 2008 19:27:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:13:01 GMT