<div dir="ltr">Armin,<div>I don't have much to add to what you have already found out. I personally consider the <span style="font-family:monospace">GoogleCRS84Quad grid as defined by the spec to be broken, and have not implemented its support as it would require some specific hacks in the code (as the extent for level 0 needs to be hardcoded for this specific grid, instead of it being derived from grid properties as is the case with all other grid definitions).</span></div>
<div><span style="font-family:monospace"><br></span></div><div style><font face="monospace">I suppose that support for this could be added if you really need it badly. The impact is not negligible as all places where an extent is derived from a tile coordinate and vice-versa would need to be updated to support this illogical quirk.</font></div>
<div style><font face="monospace"><br></font></div><div style><font face="monospace">FWIW, I believe I had brought this up as a change request to the wmts working group, but this was ignored as I am not a member.</font></div>
<div style><font face="monospace"><br></font></div><div style><font face="monospace">best regards,</font></div><div style><font face="monospace"><br></font></div><div style><font face="monospace">thomas</font></div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 9 April 2013 20:57, Armin Burger <span dir="ltr"><<a href="mailto:armin.burger@gmx.net" target="_blank">armin.burger@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all<br>
<br>
I have a question regarding the GoogleCRS84Quad TileMatrixSet defined in MapCache. MapCache specifies this in the docs with the first level [0] as pixel resolution 0.70312500 deg, and an extent of<br>
  <extent>-180 -90 180 90</extent><br>
<br>
and returns the GoogleCRS84Quad TileMatrixSet in the Capabilities response like<br>
<br>
<TileMatrixSet><br>
  <Identifier>WGS84</Identifier><br>
  <Title>GoogleCRS84Quad</Title><br>
  <SupportedCRS>urn:ogc:def:crs:<u></u>EPSG:6.3:4326</SupportedCRS><br>
  <BoundingBox crs="urn:ogc:def:crs:EPSG:6.3:<u></u>4326"><br>
    <LowerCorner>-180.000000 -90.000000</LowerCorner><br>
    <UpperCorner>180.000000 90.000000</UpperCorner><br>
  </BoundingBox><br>
<br>
<WellKnownScaleSet>urn:ogc:<u></u>def:wkss:OGC:1.0:<u></u>GoogleCRS84Quad</<u></u>WellKnownScaleSet><br>
  <TileMatrix><br>
    <Identifier>0</Identifier><br>
    <ScaleDenominator>279541132.<u></u>01435887813568115234</<u></u>ScaleDenominator><br>
    <TopLeftCorner>90.000000 -180.000000</TopLeftCorner><br>
    <TileWidth>256</TileWidth><br>
    <TileHeight>256</TileHeight><br>
    <MatrixWidth>2</MatrixWidth><br>
    <MatrixHeight>1</MatrixHeight><br>
  </TileMatrix><br>
  .....<br>
</TileMatrixSet><br>
<br>
This looks clear and logical, but the OGC specs at<br>
  <a href="http://portal.opengeospatial.org/files/?artifact_id=35326" target="_blank">http://portal.opengeospatial.<u></u>org/files/?artifact_id=35326</a><br>
define this TileMatrixSet differently as<br>
<br>
"E.3 GoogleCRS84Quad (urn:ogc:def:wkss:OGC:1.0:<u></u>GoogleCRS84Quad)<br>
This well-known scale set has been defined to allow quadtree pyramids in CRS84. Level 0 allows representing the whole world in a single 256x256 pixels (where the first 64 and last 64 lines of the tile are left blank). The next level represents the whole world in 2x2<br>

tiles of 256x256 pixels and so on in powers of 2. Scale denominator is only accurate near the equator."<br>
<br>
The level 0 in the OGC specs uses a resolution of 1.40625000.<br>
<br>
The tile 0/0/0 in MapCache is not a single tile as in the OGC specs but the first out of 2 tiles for this level, correctly defined with MatrixWidth 2 and MatrixHeight 1 (level 1 has 4x2 tiles). For me the OGC specs are not logical, because the TopLeft corner would correspond to 180 -180 degrees which makes no sense for me, but somehow they are regarded as the default specs...<br>

<br>
So the XML definition of the OGC specs should probably result in something like<br>
<br>
  <TileMatrix><br>
    <Identifier>0</Identifier><br>
    <ScaleDenominator>559082264.<u></u>0287178</ScaleDenominator><br>
    <TopLeftCorner>180.000000 -180.000000</TopLeftCorner><br>
    <TileWidth>256</TileWidth><br>
    <TileHeight>256</TileHeight><br>
    <MatrixWidth>1</MatrixWidth><br>
    <MatrixHeight>1</MatrixHeight><br>
  </TileMatrix><br>
<br>
Unfortunately the OGC doc does not provide this matrix set's full definition in XML to check this.<br>
<br>
<br>
So I'm wondering which is the correct definition? And any idea how to deal with this discrepancy?<br>
<br>
Thanks<br>
Armin<br>
<br>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-<u></u>users</a><br>
</blockquote></div><br></div>