[gdal-dev] How does WMTS driver detect DataWindow?
even.rouault at spatialys.com
Fri Dec 2 08:33:53 PST 2016
On mardi 29 novembre 2016 11:49:36 CET Rahkonen Jukka (MML) wrote:
> With a little help GDAL picks up correct extent. Removing the erroneous
> WGS84BoundingBox hint from GetCapabilities made it.
> I consider that there is a bug in the WMTS server which is advertising
> invalid bounding box but I don't really know GDAL should do. I am not good
> at reading the code from
> but I do see that there are comments about making a clip with the implied
> bounding box of the most precise tile matrix, taking into account the
> TileMatrix limits if they appear in GetCapabilities
> The logic seems to be now
> 1) Use the BoundingBox of the layer expressed in the SRS of the tile
> matrix set if that exists (row 1394)
> 2) Otherwise use the BoundingBox of the layer expressed in some other
> SRS (for example WGS84) if that exists (row 1506)
> 3) Otherwise use the BoundingBox of the tile matrix set if that exists
> (row 1550)
> 4) Otherwise compute the bounding box from the definition of the most
> precise tile matrix (1558)
> The comments about clipping are on rows 1572 and 1587.
> So if the meaning was to take the advertised bounding box and clip it with
> the box that is computed from the tile matrix set and its limits, it seems
> to fail with our data
> In our case the layer has this faulty
> <ows:LowerCorner>-6.38153862706 55.6179644952</ows:LowerCorner>
> <ows:UpperCorner>60.3815386271 75.5825702342</ows:UpperCorner>
> and our most precise TM is
> <TopLeftCorner>-548576.0 8388608.0</TopLeftCorner>
> With WGS84BoundingBox GDAL finds
> and without WGS84BoundingBox the correct
OK, I managed to reproduce with your above elements. I've pushed a fix so that in that case
the WGS84BoundingBox is just ignored and the most precise tile matrix used.
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev