<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 April 2013 21:35, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Thomas<br>
<br>
thanks for the clarifications.<br>
<br>
I tried to define a grid that could fit those OGS specs with the following parameters:<br>
<br>
 <grid name="OGCWGS84"><br>
      <metadata><br>
         <title>OGCCRS84Quad</title> <WellKnownScaleSet>urn:ogc:<u></u>def:wkss:OGC:1.0:OGCCRS84Quad<<u></u>/WellKnownScaleSet><br>
      </metadata><br>
      <extent>-180 -180 180 180</extent><br>
      <srs>EPSG:4326</srs><br>
      <units>dd</units><br>
      <size>256 256</size><br>
      <resolutions>1.40625000000000 0.703125000000000 0.351562500000000 0.175781250000000 8.78906250000000e-2 4.394531<br>
25000000e-2 2.19726562500000e-2 1.09863281250000e-2 5.49316406250000e-3 2.74658203125000e-3 1.37329101562500e-3 6.8664<br>
5507812500e-4 3.43322753906250e-4 1.71661376953125e-4 8.58306884765625e-5 4.29153442382812e-5 2.14576721191406e-5 1.07<br>
288360595703e-5 5.36441802978516e-6</<u></u>resolutions><br>
   </grid><br>
<br>
For me the capability output looks correct, and the tile level 0 is the whole world in 1 single tile, with upper and lower quarter left blank. I guess that's what the specs want it to be and so it should be possible to satisfy this strange definition if required.<br>
</blockquote><div><br></div><div style>If that grid definition is the correct one for the GoogleCRS84Quad then fine. However I feel this definition is still very strange, as clients have to know that they should not request tiles with row 0 and 3 for level 2,  rows 0,1,6 and 7 for level 3, rows 0,1,2,3,12,13,14,15 for level 4, etc... (i.e. these tiles are all fully over 90 degrees north or under -90 degrees south.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
I guess that the MapCache definition of the "GoogleCRS84Quad" corresponds to what the European INSPIRE initiative defines as "InspireCRS84Quad" in the document<br>
<br>
<a href="http://inspire.jrc.ec.europa.eu/documents/Network_Services/TechnicalGuidance_ViewServices_v3.1.pdf" target="_blank">http://inspire.jrc.ec.europa.<u></u>eu/documents/Network_Services/<u></u>TechnicalGuidance_<u></u>ViewServices_v3.1.pdf</a><br>

<br>
It states:<br>
"The level 0 of InspireCRS84Quad is the level 1 of GoogleCRS84Quad. This level has been discarded because Level 0 of GoogleCRS84Quad allows representing the whole world in a single 256x256 pixels where the first 64 and last 64 lines of the tile are left blank. To avoid this situation the level 0 of InspireCRS84Quad is composed of two tiles representing exactly the whole world."<br>
</blockquote><div><br></div><div style>Yes, that is the exact definition of what mapcache is using for the "WGS84" grid. However I think the inspire phrase "The level 0 of InspireCRS84Quad is the level 1 of GoogleCRS84Quad" is not exact, as level 1 in GoogleCRS84Quad is 2x2 tiles whereas InspireCRS84Quad's level 0 is 2x1 tiles.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
They do not add the full XML description, however.<br>
<br>
Best regards<br>
Armin<div class="im"><br>
<br>
<br>
On 04/10/2013 05:50 PM, thomas bonfort wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
Armin,<br>
I don't have much to add to what you have already found out. I<br>
personally consider the GoogleCRS84Quad grid as defined by the spec to<br>
be broken, and have not implemented its support as it would require some<br>
specific hacks in the code (as the extent for level 0 needs to be<br>
hardcoded for this specific grid, instead of it being derived from grid<br>
properties as is the case with all other grid definitions).<br>
<br>
I suppose that support for this could be added if you really need it<br>
badly. The impact is not negligible as all places where an extent is<br>
derived from a tile coordinate and vice-versa would need to be updated<br>
to support this illogical quirk.<br>
<br>
FWIW, I believe I had brought this up as a change request to the wmts<br>
working group, but this was ignored as I am not a member.<br>
<br>
best regards,<br>
<br>
thomas<br>
<br>
<br>
On 9 April 2013 20:57, Armin Burger <<a href="mailto:armin.burger@gmx.net" target="_blank">armin.burger@gmx.net</a><br></div><div class="im">
<mailto:<a href="mailto:armin.burger@gmx.net" target="_blank">armin.burger@gmx.net</a>>> wrote:<br>
<br>
    Dear all<br>
<br>
    I have a question regarding the GoogleCRS84Quad TileMatrixSet<br>
    defined in MapCache. MapCache specifies this in the docs with the<br>
    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<br>
    response like<br>
<br>
    <TileMatrixSet><br>
       <Identifier>WGS84</Identifier><br>
       <Title>GoogleCRS84Quad</Title><br></div>
       <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"><div class="im"><br>
         <LowerCorner>-180.000000 -90.000000</LowerCorner><br>
         <UpperCorner>180.000000 90.000000</UpperCorner><br>
       </BoundingBox><br>
<br></div>
    <WellKnownScaleSet>urn:ogc:__<u></u>def:wkss:OGC:1.0:__<u></u>GoogleCRS84Quad</__<u></u>WellKnownScaleSet><br>
       <TileMatrix><br>
         <Identifier>0</Identifier><br>
<br>
    <ScaleDenominator>279541132.__<u></u>01435887813568115234</__<u></u>ScaleDenominator><div class="im"><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></div>
    <a href="http://portal.opengeospatial." target="_blank">http://portal.opengeospatial.</a>_<u></u>_org/files/?artifact_id=35326<div class="im"><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></div>
    "E.3 GoogleCRS84Quad (urn:ogc:def:wkss:OGC:1.0:__<u></u>GoogleCRS84Quad)<div class="im"><br>
    This well-known scale set has been defined to allow quadtree<br>
    pyramids in CRS84. Level 0 allows representing the whole world in a<br>
    single 256x256 pixels (where the first 64 and last 64 lines of the<br>
    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<br>
    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<br>
    but the first out of 2 tiles for this level, correctly defined with<br>
    MatrixWidth 2 and MatrixHeight 1 (level 1 has 4x2 tiles). For me the<br>
    OGC specs are not logical, because the TopLeft corner would<br>
    correspond to 180 -180 degrees which makes no sense for me, but<br>
    somehow they are regarded as the default specs...<br>
<br>
    So the XML definition of the OGC specs should probably result in<br>
    something like<br>
<br>
       <TileMatrix><br>
         <Identifier>0</Identifier><br></div>
         <ScaleDenominator>559082264.__<u></u>0287178</ScaleDenominator><div class="im"><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<br>
    definition in XML to check this.<br>
<br>
<br>
    So I'm wondering which is the correct definition? And any idea how<br>
    to deal with this discrepancy?<br>
<br>
    Thanks<br>
    Armin<br>
<br>
<br>
<br>
<br>
<br>
<br></div>
    ______________________________<u></u>___________________<br>
    mapserver-users mailing list<br>
    mapserver-users@lists.osgeo.__<u></u>org<br>
    <mailto:<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.<u></u>osgeo.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>
    <<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>
<br>
<br>
</blockquote>
</blockquote></div><br></div></div>