<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:55057631;
        mso-list-template-ids:-1734594228;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:385252994;
        mso-list-type:hybrid;
        mso-list-template-ids:193655634 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l2
        {mso-list-id:1409040766;
        mso-list-type:hybrid;
        mso-list-template-ids:-1893021154 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l3
        {mso-list-id:1504976289;
        mso-list-template-ids:-973573306;}
@list l3:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l3:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l3:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l3:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l4
        {mso-list-id:1506093317;
        mso-list-type:hybrid;
        mso-list-template-ids:-1409274278 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l4:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l4:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l4:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l4:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l4:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l4:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l4:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l4:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l4:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l5
        {mso-list-id:1968658948;
        mso-list-type:hybrid;
        mso-list-template-ids:1176164348 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l5:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l5:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l5:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l5:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l5:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l5:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l5:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l5:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l5:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Let us look at the <i>geoSystem</i> field in detail. The relevant clause is ISO/IEC 19775-1 25.2.3 Specifying a spatial reference frame (see <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#Specifyingaspatialreference">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#Specifyingaspatialreference</a>). The first paragraph of this clause reads:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>“</span>All the X3D nodes that allow inclusion of geographic coordinates support a field called <i>geoSystem</i>. This field is used to specify the particular spatial reference frame that will be used for the geospatial coordinates in that node. This is an MFString field that can include a number of arguments to fully designate the spatial reference frame. Each argument appears in a separate string within the MFString array. Argument matching is case sensitive. Optional arguments may appear in any order. The following values are supported.”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What does this tell us? And what doesn’t it tell us? Here goes:<o:p></o:p></p><ul style='margin-top:0cm' type=disc><li class=MsoListParagraph style='margin-left:0cm;mso-list:l2 level1 lfo1'><i>geoSystem</i> is an MFString field<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l2 level1 lfo1'>It specifies the particular spatial reference frame<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l2 level1 lfo1'>It says that three values are supported, namely “GD”, “UTM” and “GC”<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l2 level1 lfo1'>It says the optional arguments may appear in any order<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l2 level1 lfo1'>It does <b><u>not</u></b> specifically state that any arguments are mandatory<o:p></o:p></li></ul><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>The subsequent three bullet points list the supported values. We’ll look at each of them in turn, in a moment. First, we should refer to clause 25.2.2 Spatial reference frames (see <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#Spatialreferenceframes">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#Spatialreferenceframes</a>). Table 25.2 lists the same three supported spatial reference frames. However, the first sentence of the text in the paragraph immediately following Table 25.2 reads as follows:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal>“The code GDC shall be synonymous to GD and the code GCC shall be synonymous to GC.”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>We have to take account of the synonyms.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>One further point is from the last paragraph of 25.2.3, which reads:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>“If no geoSystem field is specified, the default value is [ "GD", "WE" ].”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So, I started the JSON schema definition for this field with the presumed requirement that the first string value is required, and must be one of the supported values, or synonyms. Since, as we shall see, that the three spatial reference frame types have rather different additional arguments, I decided to take the “oneOf” approach, dealing with each type separately. Let’s take the first type, “GD”, which has the synonym  “GDC”. The first bullet point in 25.2.3 reads:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:12.0pt'>“"<b>GD</b>" - Geodetic spatial reference frame (latitude/longitude). An optional argument may be used to specify the ellipsoid using one of the ellipsoid codes that are defined in <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#t-earthellipsoids">Table 25.3</a>. If no ellipsoid is specified, then "WE" is assumed (<i>i.e.</i>, the WGS84 ellipsoid). An optional "WGS84" string can be specified if you wish all elevations to relative to the WGS84 geoid (<i>i.e.</i>, mean sea level) (see <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#t-earthgeoids">Table 25.4</a>); otherwise, all elevations will be relative to the ellipsoid. An example spatial reference frame definition of this format is [ "GD", "WD" ], for a geodetic spatial reference frame based upon the </span>WGS72 ellipsoid with all elevations being relative to that ellipsoid.”<o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>And this tell us:<o:p></o:p></span></p><ul style='margin-top:0cm' type=disc><li class=MsoListParagraph style='margin-left:0cm;mso-list:l1 level1 lfo4'><span style='mso-fareast-language:EN-US'>There is an optional argument to specify one of the ellipsoids from Table 25.3.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l1 level1 lfo4'><span style='mso-fareast-language:EN-US'>An optional “WGS84” can be specified if all elevations are to be relative to the WGS84 geoid.<o:p></o:p></span></li></ul><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Here’s my JSON schema expanded to show this spatial reference frame type:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><img border=0 width=713 height=590 style='width:7.427in;height:6.1458in' id="Picture_x0020_1" src="cid:image001.png@01D2D316.0EFFEBC0"><span style='mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Does it conform? Let’s see:<o:p></o:p></span></p><ul style='margin-top:0cm' type=disc><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The array is constrained to contain from one to three strings<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The first string in the array, which is required has two enumerations, namely “GD” and “GDC”, so the synonym is present.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The second string in the array, which is optional, is an enumeration for all 23 of the supported earth ellipsoids from table 25.3.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The third string in the array, which is also optional, can only take the value “WGS84”<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The array <b><span style='color:red'>fails</span></b> to allow for the optional arguments to appear in any order<o:p></o:p></span></li></ul><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>No, it does not conform. However, this can be rectifies fairly easily, by adding an additional subschema, whereby the optional “WGS84” is the second string, and the list of 23 supported earth geoids. Now, this section consists of two subschemas, as follows:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><img border=0 width=699 height=653 style='width:7.2812in;height:6.802in' id="Picture_x0020_2" src="cid:image002.png@01D2D317.58385100"><span style='mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Now, let’s turn to the second supported spatial reference frame type. This is “UTM”. The second bullet point of 25.2.3 reads:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>“</span>"<b>UTM</b>" - Universal Transverse Mercator. One further required argument must be supplied for UTM in order to specify the zone number (1..60). This is given in the form "Z<n>", where <n> is the zone number. An optional argument of "S" may be supplied in order to specify that the coordinates are in the southern hemisphere (otherwise, northern hemisphere will be assumed). A further optional argument may be used to specify the ellipsoid using one of the ellipsoid codes that are defined in <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#t-earthellipsoids">Table 25.3</a>. If no ellipsoid is specified, then "WE" is assumed (<i>i.e.</i>, the WGS84 ellipsoid). An optional "WGS84" string can be specified if you wish all elevations to relative to the WGS84 geoid (<i>i.e.</i>, mean sea level (see <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#t-earthgeoids">Table 25.4</a>)); otherwise, all elevations will be relative to the ellipsoid. An example spatial reference frame definition of this format is [ "UTM", "Z10", "S", "GD" ], for a southern hemisphere UTM spatial reference frame in zone 10 with all elevations being with respect to mean sea level.”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The salient points are:<o:p></o:p></p><ul style='margin-top:0cm' type=disc><li class=MsoListParagraph style='margin-left:0cm;mso-list:l5 level1 lfo6'><span style='mso-fareast-language:EN-US'>The second string is a required argument, and must be a zone number of the form “z<N>”, where the “<n>” is the zone number, from one to sixty, inclusive. <o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l5 level1 lfo6'><span style='mso-fareast-language:EN-US'>An optional argument “S” may be supplied to indicate southern hemisphere. Note that the use of an “N” is not permitted.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l5 level1 lfo6'><span style='mso-fareast-language:EN-US'>A further optional argument to specify one of the ellipsoids from Table 25.3.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l5 level1 lfo6'><span style='mso-fareast-language:EN-US'>An optional “WGS84” can be specified if all elevations are to be relative to the WGS84 geoid.<o:p></o:p></span></li></ul><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Here’s my JSON schema expanded to show this spatial reference frame type:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><img border=0 width=671 height=517 style='width:6.9895in;height:5.3854in' id="Picture_x0020_3" src="cid:image003.png@01D2D31A.29A64A60"><span style='mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Does it conform? Let’s see:<o:p></o:p></span></p><ul style='margin-top:0cm' type=disc><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The array is constrained to contain from one to five strings. This <b><span style='color:red'>fails</span></b> because the second string is required.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The first string in the array can only take the value UTM.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The second string in the array, which is optional, can take any one of the 60 zone number values.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The third string in the array, which is optional, can only take the value “S”.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The fourth string in the array, which is optional, is an enumeration for all 23 of the supported earth ellipsoids from table 25.3.<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The fifth string in the array, which is also optional, can only take the value “WGS84”<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l4 level1 lfo5'><span style='mso-fareast-language:EN-US'>The array <b><span style='color:red'>fails</span></b> to allow for the optional arguments to appear in any order.<o:p></o:p></span></li></ul><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>So this fails on two counts. The first failure, not making the zone number required, is easy to fix. The array constraints should be changed to contain from two to five strings. The second failure, the appearance of the optional arguments in any order, could be fixed in a similar manner to the first case above, introducing additional subschemas. For this instance, as many as nine might be required. This would take careful consideration of all possible combinations, bearing in mind that any, or even all, of the three optional arguments could be absent. I will try to solve this problem at a later date.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Finally let’s consider the third case. The final bullet point from 25.2.3 reads:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>“</span>"<b>GC</b>" - Earth-fixed Geocentric with respect to the WGS84 ellipsoid. No additional arguments are supported. An example spatial reference frame definition of this format is [ "GC" ].”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This is straightforward, since no additional arguments are supported. The only consideration required is the synonym. Here is the expanded JSON schema for this:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><img border=0 width=595 height=387 style='width:6.1979in;height:4.0312in' id="Picture_x0020_4" src="cid:image004.png@01D2D31B.59A307C0"><o:p></o:p></p><p class=MsoNormal>Now we see that only one string is permitted in the array, and it has the two possible values “GC” and “GCC” as required. This conforms to the requirements.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Before closing this discussion I should point out that the lack of support for an optional “N” value for the UTM reference frame has been raised before. This is covered in Mantis issue 938 (see <a href="http://www.web3d.org/member-only/mantis/view.php?id=938">http://www.web3d.org/member-only/mantis/view.php?id=938</a>). Candidate resolutions have been proposed, but none firmly decided upon. This means that those geospatial examples in the archive, such as Squaw LOD 029 (<a href="http://www.web3d.org/x3d/content/examples/Basic/Geospatial/SquawLOD029Index.html">http://www.web3d.org/x3d/content/examples/Basic/Geospatial/SquawLOD029Index.html</a>) do not conform to V3.3. In fact, this particular example is against V3.0 of the standard. However, the wording is technically identical, therefore this does not conform to V3.0 either.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Since neither the DTD nor the XML schema have sufficient expressive power to validate the individual string values, these errors have probably not been picked up before. I don’t know what level of checking is built into the current version of the schematron. I did run this particular example on the X3D validator, and it passed all tests. The development of the JSON schema, with this very strong validation capability, has now exposed these issues.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>All the best,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Roy<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> John Carlson [mailto:yottzumm@gmail.com] <br><b>Sent:</b> 21 May 2017 02:29<br><b>To:</b> Don Brutzman <brutzman@nps.edu>; Roy Walmsley <roy.walmsley@ntlworld.com><br><b>Cc:</b> X3D Graphics public mailing list <x3d-public@web3d.org><br><b>Subject:</b> RE: [x3d-public] candidate geoSystem correction to JSON schema<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>Don, try this Schema.  These are my modifications.  Note that I don’t have some of the required @name fields yet in this schema.  They will need to be added.  Also, are IMPORTs up to date?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Will provide an update when ready.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><br>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>John<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From: </span></b><span lang=EN-US><a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Sent: </b>Saturday, May 20, 2017 8:57 PM<br><b>To: </b><a href="mailto:roy.walmsley@ntlworld.com">Roy Walmsley</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>[x3d-public] candidate geoSystem correction to JSON schema<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>JSON Schema sayeth<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>"@geoSystem": {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                "description": "Attempts to validate all possible combinations",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                "oneOf": [<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                "type": "array",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                "minItems": 1,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                "maxItems": 3,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                "items": [<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                                "type": "string",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                                "enum": [<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                                                "GD",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                                                "GDC"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                                ],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                                "default": "GD"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                                                                },<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>while in X3D abstract specification:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>25.2.2 Spatial reference frames<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#Spatialreferenceframes">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html#Spatialreferenceframes</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Table 25.2 — Supported spatial reference frames<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>lists GD GC UTM and is followed by special cases GDC and GCC.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Suggest adding enumeration values for "GC", "GCC", "UTM"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>However I do see other entries further down for "UTM" and default "GD" (though GD is not also listed there as an enum value).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Example scene for testing is Squaw.x3d with Squaw.json including<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>                "@geoSystem":["UTM","Z10","N"],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Also Mars.x3d and Mars.json with recent updates at<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>                <a href="http://www.web3d.org/x3d/content/examples/Basic/Geospatial/">http://www.web3d.org/x3d/content/examples/Basic/Geospatial/</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Not quite sure how you are handling things there, hope you can sort it out OK.  TIA.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>all the best, Don<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>-- <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman">http://faculty.nps.edu/brutzman</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>_______________________________________________<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>x3d-public mailing list<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>