diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index b17f79de51..2e2f610c52 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -461,7 +461,7 @@ export function optionsFromCapabilities(wmtsCap, config) { } let wrapX = false; - const switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne'; + const switchXY = projection.getAxisOrientation().substr(0, 2) == 'ne'; let matrix = matrixSetObj.TileMatrix[0]; @@ -491,12 +491,20 @@ export function optionsFromCapabilities(wmtsCap, config) { const resolution = (matrix.ScaleDenominator * 0.00028) / projection.getMetersPerUnit(); // WMTS 1.0.0: standardized rendering pixel size - const origin = switchOriginXY + const origin = switchXY ? [matrix.TopLeftCorner[1], matrix.TopLeftCorner[0]] : matrix.TopLeftCorner; const tileSpanX = matrix.TileWidth * resolution; const tileSpanY = matrix.TileHeight * resolution; - const matrixSetExtent = matrixSetObj['BoundingBox']; + let matrixSetExtent = matrixSetObj['BoundingBox']; + if (matrixSetExtent && switchXY) { + matrixSetExtent = [ + matrixSetExtent[1], + matrixSetExtent[0], + matrixSetExtent[3], + matrixSetExtent[2], + ]; + } let extent = [ origin[0] + tileSpanX * selectedMatrixLimit.MinTileCol, // add one to get proper bottom/right coordinate diff --git a/test/browser/spec/ol/format/wmts/capabilities_epsg4326_with_boundingbox.xml b/test/browser/spec/ol/format/wmts/capabilities_epsg4326_with_boundingbox.xml new file mode 100644 index 0000000000..cf60428d63 --- /dev/null +++ b/test/browser/spec/ol/format/wmts/capabilities_epsg4326_with_boundingbox.xml @@ -0,0 +1,1259 @@ + + + + EOX::Maps + EOX::Maps are background and overlay maps made of Open Data and designed and provided by EOX. + + maps + + OGC WMTS + 1.0.0 + Proper attribution is required for any usage. The attribution shall follow the example of the demo map at https://maps.eox.at in the lower right corner including the respective links e.g. "Terrain { Data © OpenStreetMap contributers and others, Rendering © EOX }" with links to http://www.openstreetmap.org/copyright, https://maps.eox.at/#data, and https://eox.at. Additional restrictions may apply for individual layers as indicated in the respective abstract. + + + EOX + + + Stephan Meissl + + + +43 664 9688701 + + + EOX IT Services GmbH + Vienna + 1090 + Austria + stephan.meissl@eox.at + + + + + + + + + + + + KVP + + + + + + + + + + + + + KVP + + + + + + + + + + + + + KVP + + + + + + + + + TBD + application/vnd.iso.19139+xml + + + + eng + + + + eng + + + + + + Blue marble background layer by EOX - 4326 + <a href="https://maps.eox.at">Blue Marble</a> { &copy; <a href="http://nasa.gov">NASA</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + bluemarble + + image/jpeg + + WGS84 + + + + + Sentinel-2 cloudless layer for 2021 by EOX - 3857 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2021) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + s2cloudless-2021_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Black coastline overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Black coastline overlay</a> { Rendering &copy; <a href="https://eox.at">EOX</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + coastline_black + + image/png + + WGS84 + + + + + Sentinel-2 cloudless layer for 2017 by EOX - 3857 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2017) released under <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. + s2cloudless-2017_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Streets overlay layer by EOX - 3857 + <a href="https://maps.eox.at">Streets overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + streets_3857 + + image/png + + g + + + GoogleMapsCompatible + + + + + Bright overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Overlay bright</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + overlay_bright + + image/png + + WGS84 + + + + + Sentinel-2 cloudless layer for 2019 by EOX - 3857 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2019) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + s2cloudless-2019_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + overlay + + image/png + + WGS84 + + + + + Black marble background layer by EOX - 3857 + <a href="https://maps.eox.at">Black Marble</a> { &copy; <a href="http://nasa.gov">NASA</a> } + blackmarble_3857 + + image/jpeg + + g + + + + + Hydrography overlay layer by EOX - 3857 + <a href="https://maps.eox.at">Hydrography overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + hydrography_3857 + + image/png + + g + + + GoogleMapsCompatible + + + + + Sentinel-2 cloudless layer for 2017 by EOX - 4326 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2017) released under <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. + + -180.000000 -90.000000 + 180.000000 90.000000 + + s2cloudless-2017 + + image/jpeg + + WGS84 + + + + + Streets overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Streets overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + streets + + image/png + + WGS84 + + + + + Sentinel-2 cloudless layer for 2018 by EOX - 4326 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2017 &amp; 2018) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + + -180.000000 -90.000000 + 180.000000 90.000000 + + s2cloudless-2018 + + image/jpeg + + WGS84 + + + + + Sentinel-2 cloudless layer for 2019 by EOX - 4326 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2019) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + + -180.000000 -90.000000 + 180.000000 90.000000 + + s2cloudless-2019 + + image/jpeg + + WGS84 + + + + + OpenStreetMap background layer by EOX - 4326 + <a href="https://maps.eox.at">OpenStreetMap</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + osm + + image/jpeg + + WGS84 + + + + + Black marble background layer by EOX - 4326 + <a href="https://maps.eox.at">Black Marble</a> { &copy; <a href="http://nasa.gov">NASA</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + blackmarble + + image/jpeg + + WGS84 + + + + + Terrain Light background layer by EOX - 3857 + <a href="https://maps.eox.at">Terrain Light</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors and <a href="https://maps.eox.at/#data">others</a>, Rendering &copy; <a href="https://eox.at">EOX</a> } + terrain-light_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Blue marble background layer by EOX - 3857 + <a href="https://maps.eox.at">Blue Marble</a> { &copy; <a href="http://nasa.gov">NASA</a> } + bluemarble_3857 + + image/jpeg + + g + + + + + Overlay layer by EOX - 3857 + <a href="https://maps.eox.at">Overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + overlay_base_3857 + + image/png + + g + + + GoogleMapsCompatible + + + + + Sentinel-2 cloudless layer for 2016 by EOX - 4326 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2016 &amp; 2017) released under <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. + + -180.000000 -90.000000 + 180.000000 90.000000 + + s2cloudless + + image/jpeg + + WGS84 + + + + + Terrain background layer by EOX - 4326 + <a href="https://maps.eox.at">Terrain</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors and <a href="https://maps.eox.at/#data">others</a>, Rendering &copy; <a href="https://eox.at">EOX</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + terrain + + image/jpeg + + WGS84 + + + + + Bright overlay layer by EOX - 3857 + <a href="https://maps.eox.at">Overlay bright</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + overlay_bright_3857 + + image/png + + g + + + GoogleMapsCompatible + + + + + Coastline overlay layer by EOX - 3857 + <a href="https://maps.eox.at">Coastline overlay</a> { Rendering &copy; <a href="https://eox.at">EOX</a> } + coastline_3857 + + image/png + + g + + + + + Sentinel-2 cloudless layer for 2020 by EOX - 3857 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2020) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + s2cloudless-2020_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Magnetic Graticules overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Magnetic Graticules</a> { Rendering &copy; <a href="https://eox.at">EOX</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + magnetic_graticules + + image/png + + WGS84 + + + + + Terrain Light background layer by EOX - 4326 + <a href="https://maps.eox.at">Terrain Light</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors and <a href="https://maps.eox.at/#data">others</a>, Rendering &copy; <a href="https://eox.at">EOX</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + terrain-light + + image/jpeg + + WGS84 + + + + + Bright overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Overlay bright</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + overlay_base_bright + + image/png + + WGS84 + + + + + Overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + overlay_base + + image/png + + WGS84 + + + + + Sentinel-2 cloudless layer for 2018 by EOX - 3857 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2017 &amp; 2018) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + s2cloudless-2018_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Coastline overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Coastline overlay</a> { Rendering &copy; <a href="https://eox.at">EOX</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + coastline + + image/png + + WGS84 + + + + + Sentinel-2 cloudless layer for 2020 by EOX - 4326 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2020) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + + -180.000000 -90.000000 + 180.000000 90.000000 + + s2cloudless-2020 + + image/jpeg + + WGS84 + + + + + Sentinel-2 cloudless layer for 2021 by EOX - 4326 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2021) released under <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. For commercial usage please see <a href="https://cloudless.eox.at">https://cloudless.eox.at</a> + + -180.000000 -90.000000 + 180.000000 90.000000 + + s2cloudless-2021 + + image/jpeg + + WGS84 + + + + + OpenStreetMap background layer by EOX - 3857 + <a href="https://maps.eox.at">OpenStreetMap</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + osm_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Sentinel-2 cloudless layer for 2016 by EOX - 3857 + <a xmlns:dct="http://purl.org/dc/terms/" href="https://s2maps.eu" property="dct:title">Sentinel-2 cloudless - https://s2maps.eu</a> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://eox.at" property="cc:attributionName" rel="cc:attributionURL">EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2016 &amp; 2017) released under <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. + s2cloudless_3857 + + image/jpeg + + g + + + GoogleMapsCompatible + + + + + Terrain background layer by EOX - 3857 + <a href="https://maps.eox.at">Terrain</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors and <a href="https://maps.eox.at/#data">others</a>, Rendering &copy; <a href="https://eox.at">EOX</a> } + terrain_3857 + + image/jpeg + + g + + + + + Bright overlay layer by EOX - 3857 + <a href="https://maps.eox.at">Overlay bright</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + overlay_base_bright_3857 + + image/png + + g + + + GoogleMapsCompatible + + + + + Hydrography overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Hydrography overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + hydrography + + image/png + + WGS84 + + + + + Graticules overlay layer by EOX - 4326 + <a href="https://maps.eox.at">Graticules</a> { Rendering &copy; <a href="https://eox.at">EOX</a> } + + -180.000000 -90.000000 + 180.000000 90.000000 + + graticules + + image/png + + WGS84 + + + + + Overlay layer by EOX - 3857 + <a href="https://maps.eox.at">Overlay</a> { Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Rendering &copy; <a href="https://eox.at">EOX</a> and <a href="https://github.com/mapserver/basemaps">MapServer</a> } + overlay_3857 + + image/png + + g + + + GoogleMapsCompatible + + + + + WGS84 + + -90.000000 -180.000000 + 90.000000 180.000000 + + urn:ogc:def:crs:EPSG:6.3:4326 + urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad + + 0 + 279541132.01435887813568115234 + 90.000000 -180.000000 + 256 + 256 + 2 + 1 + + + 1 + 139770566.00717943906784057617 + 90.000000 -180.000000 + 256 + 256 + 4 + 2 + + + 2 + 69885283.00358971953392028809 + 90.000000 -180.000000 + 256 + 256 + 8 + 4 + + + 3 + 34942641.50179485976696014404 + 90.000000 -180.000000 + 256 + 256 + 16 + 8 + + + 4 + 17471320.75089742988348007202 + 90.000000 -180.000000 + 256 + 256 + 32 + 16 + + + 5 + 8735660.37544871494174003601 + 90.000000 -180.000000 + 256 + 256 + 64 + 32 + + + 6 + 4367830.18772435747087001801 + 90.000000 -180.000000 + 256 + 256 + 128 + 64 + + + 7 + 2183915.09386217873543500900 + 90.000000 -180.000000 + 256 + 256 + 256 + 128 + + + 8 + 1091957.54693108936771750450 + 90.000000 -180.000000 + 256 + 256 + 512 + 256 + + + 9 + 545978.77346554468385875225 + 90.000000 -180.000000 + 256 + 256 + 1024 + 512 + + + 10 + 272989.38673277234192937613 + 90.000000 -180.000000 + 256 + 256 + 2048 + 1024 + + + 11 + 136494.69336638617096468806 + 90.000000 -180.000000 + 256 + 256 + 4096 + 2048 + + + 12 + 68247.34668319308548234403 + 90.000000 -180.000000 + 256 + 256 + 8192 + 4096 + + + 13 + 34123.67334159654274117202 + 90.000000 -180.000000 + 256 + 256 + 16384 + 8192 + + + 14 + 17061.83667079825318069197 + 90.000000 -180.000000 + 256 + 256 + 32768 + 16384 + + + 15 + 8530.91833539912659034599 + 90.000000 -180.000000 + 256 + 256 + 65536 + 32768 + + + 16 + 4265.45916769956329517299 + 90.000000 -180.000000 + 256 + 256 + 131072 + 65536 + + + 17 + 2132.72958384978574031265 + 90.000000 -180.000000 + 256 + 256 + 262144 + 131072 + + + + GoogleMapsCompatible + + -20037508.342789 -20037508.342789 + 20037508.342789 20037508.342789 + + urn:ogc:def:crs:EPSG:6.3:3857 + urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible + + 0 + 559082264.02871787548065185547 + -20037508.342789 20037508.342789 + 256 + 256 + 1 + 1 + + + 1 + 279541132.01435887813568115234 + -20037508.342789 20037508.342789 + 256 + 256 + 2 + 2 + + + 2 + 139770566.00717940926551818848 + -20037508.342789 20037508.342789 + 256 + 256 + 4 + 4 + + + 3 + 69885283.00358971953392028809 + -20037508.342789 20037508.342789 + 256 + 256 + 8 + 8 + + + 4 + 34942641.50179485976696014404 + -20037508.342789 20037508.342789 + 256 + 256 + 16 + 16 + + + 5 + 17471320.75089742988348007202 + -20037508.342789 20037508.342789 + 256 + 256 + 32 + 32 + + + 6 + 8735660.37544871494174003601 + -20037508.342789 20037508.342789 + 256 + 256 + 64 + 64 + + + 7 + 4367830.18772435747087001801 + -20037508.342789 20037508.342789 + 256 + 256 + 128 + 128 + + + 8 + 2183915.09386217873543500900 + -20037508.342789 20037508.342789 + 256 + 256 + 256 + 256 + + + 9 + 1091957.54693108866922557354 + -20037508.342789 20037508.342789 + 256 + 256 + 512 + 512 + + + 10 + 545978.77346554468385875225 + -20037508.342789 20037508.342789 + 256 + 256 + 1024 + 1024 + + + 11 + 272989.38673277228372171521 + -20037508.342789 20037508.342789 + 256 + 256 + 2048 + 2048 + + + 12 + 136494.69336638617096468806 + -20037508.342789 20037508.342789 + 256 + 256 + 4096 + 4096 + + + 13 + 68247.34668319307093042880 + -20037508.342789 20037508.342789 + 256 + 256 + 8192 + 8192 + + + 14 + 34123.67334159654274117202 + -20037508.342789 20037508.342789 + 256 + 256 + 16384 + 16384 + + + 15 + 17061.83667079827137058601 + -20037508.342789 20037508.342789 + 256 + 256 + 32768 + 32768 + + + 16 + 8530.91833539913568529300 + -20037508.342789 20037508.342789 + 256 + 256 + 65536 + 65536 + + + 17 + 4265.45916769956784264650 + -20037508.342789 20037508.342789 + 256 + 256 + 131072 + 131072 + + + 18 + 2132.72958384978392132325 + -20037508.342789 20037508.342789 + 256 + 256 + 262144 + 262144 + + + + g + + -20037508.342789 -20037508.342789 + 20037508.342789 20037508.342789 + + urn:ogc:def:crs:EPSG:6.3:900913 + urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible + + 0 + 559082264.02871787548065185547 + -20037508.342789 20037508.342789 + 256 + 256 + 1 + 1 + + + 1 + 279541132.01435887813568115234 + -20037508.342789 20037508.342789 + 256 + 256 + 2 + 2 + + + 2 + 139770566.00717940926551818848 + -20037508.342789 20037508.342789 + 256 + 256 + 4 + 4 + + + 3 + 69885283.00358971953392028809 + -20037508.342789 20037508.342789 + 256 + 256 + 8 + 8 + + + 4 + 34942641.50179485976696014404 + -20037508.342789 20037508.342789 + 256 + 256 + 16 + 16 + + + 5 + 17471320.75089742988348007202 + -20037508.342789 20037508.342789 + 256 + 256 + 32 + 32 + + + 6 + 8735660.37544871494174003601 + -20037508.342789 20037508.342789 + 256 + 256 + 64 + 64 + + + 7 + 4367830.18772435747087001801 + -20037508.342789 20037508.342789 + 256 + 256 + 128 + 128 + + + 8 + 2183915.09386217873543500900 + -20037508.342789 20037508.342789 + 256 + 256 + 256 + 256 + + + 9 + 1091957.54693108866922557354 + -20037508.342789 20037508.342789 + 256 + 256 + 512 + 512 + + + 10 + 545978.77346554468385875225 + -20037508.342789 20037508.342789 + 256 + 256 + 1024 + 1024 + + + 11 + 272989.38673277228372171521 + -20037508.342789 20037508.342789 + 256 + 256 + 2048 + 2048 + + + 12 + 136494.69336638617096468806 + -20037508.342789 20037508.342789 + 256 + 256 + 4096 + 4096 + + + 13 + 68247.34668319307093042880 + -20037508.342789 20037508.342789 + 256 + 256 + 8192 + 8192 + + + 14 + 34123.67334159654274117202 + -20037508.342789 20037508.342789 + 256 + 256 + 16384 + 16384 + + + 15 + 17061.83667079827137058601 + -20037508.342789 20037508.342789 + 256 + 256 + 32768 + 32768 + + + 16 + 8530.91833539913568529300 + -20037508.342789 20037508.342789 + 256 + 256 + 65536 + 65536 + + + 17 + 4265.45916769956784264650 + -20037508.342789 20037508.342789 + 256 + 256 + 131072 + 131072 + + + 18 + 2132.72958384978392132325 + -20037508.342789 20037508.342789 + 256 + 256 + 262144 + 262144 + + + + \ No newline at end of file diff --git a/test/browser/spec/ol/source/WMTS.test.js b/test/browser/spec/ol/source/WMTS.test.js index 644fa8b985..8104e51a2d 100644 --- a/test/browser/spec/ol/source/WMTS.test.js +++ b/test/browser/spec/ol/source/WMTS.test.js @@ -475,6 +475,34 @@ describe('ol/source/WMTS', function () { expectDelta(extent[3], expectedMatrixSetExtend[3]); }); }); + + describe('when creating options from epsg:4326 capabilities with BoundingBox', function () { + const parser = new WMTSCapabilities(); + let capabilities; + before(function (done) { + afterLoadText( + 'spec/ol/format/wmts/capabilities_epsg4326_with_boundingbox.xml', + function (xml) { + try { + capabilities = parser.read(xml); + } catch (e) { + done(e); + } + done(); + } + ); + }); + + it('returns correct bounding box when the layer has BoundingBox', function () { + const options = optionsFromCapabilities(capabilities, { + layer: 's2cloudless-2020', + }); + + const extent = options.tileGrid.getExtent(); + expect(extent).to.eql([-180, -90, 180, 90]); + }); + }); + describe('set wrap x by bounding box if available', function () { const parser = new WMTSCapabilities(); let capabilities;