visualization-tool icon indicating copy to clipboard operation
visualization-tool copied to clipboard

map: Parsing of CRS i.e. in WMTS Layers

Open Rdataflow opened this issue 7 months ago • 4 comments

Describe the bug WMTS Capabilities Response having ows:SupportedCRS doesnt' reflect WMTS Implementation SPEC normative examples [1]

To Reproduce

  1. include any WMTS layer from [2]
  2. See no layer appears and console.log messages on CRS not supported

Actual behavior false CRS interpretation, reporting CRS as not supported, where it actually would be supported

Expected behavior proper parsing of urn notation i.e. also consider urn:ogc:def:crs:EPSG::3857 or urn:ogc:def:crs:EPSG:6.6:3857 or whichever {version} urn:ogc:def:crs:EPSG:{version}:3857 i.e. using a pattern of

  (crs) => crs.match(/EPSG:(.*:)?(3857)$/)

Environment (please complete the following information):

  • Visualize environment and version: INT 5.7.5

Additional context [1] OGC WMTS Simple Profile [2] https://geoserver.swissdatacube.org/geoserver/gwc/service/wmts?REQUEST=GetCapabilities [3] see visualize parsing WRT https://github.com/visualize-admin/visualization-tool/blob/00d3bc70e33fcf00df12fc125977ee16d81b7c7d/app/charts/map/wms-wmts-endpoint-utils.ts#L167-L169 [4] vs battle proofed OL implementation example https://github.com/openlayers/openlayers/blob/65602233a67f2fe9ee6d08626be3491a2e2c9170/src/ol/proj/projections.js#L17-L28

nb did you ever spot CRS:84 - if so - where? (AFAICT this would differ from EPSG:3857 and have coordinates much like CRS EPSG:4326 but with inverse axis order...) - therefore, it is safe to skip CRS:84...

@ptbrowne cc @adintegra @nrohrbach

Rdataflow avatar Apr 30 '25 17:04 Rdataflow

@bprusinowski pinging you as the author as well 😉

BTW: there is no real purpose in listing unsupported layers - if you agree, can we filter those? (at least while there is no support for it?)

Rdataflow avatar Apr 30 '25 17:04 Rdataflow

@bprusinowski based on evaluation I suggest to only keep theese WMTS endpoints supporting EPSG:3857 ... besides the WMS endpoints which support EPSG:3857 more commonly

this allows to drop the non supported endpoints see https://rdataflow.github.io/WMTS-monitor/

Rdataflow avatar May 06 '25 12:05 Rdataflow

FTR CRS:84 is used in https://bio.discomap.eea.europa.eu/arcgis/services/Ecosystem/Ecosystems/MapServer/WMSServer?&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0&FORMAT=text%2Fxml and it's clearly a very different CRS and comes with the EPSG:4326, thus no use to keep it anyway.

Rdataflow avatar May 06 '25 16:05 Rdataflow

It also might be the case that we have multiple TileMatrixSets, see https://portal.ogc.org/files/?artifact_id=35326#page=35 and https://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd (thanks @Rdataflow) 👀

Image

Image

bprusinowski avatar May 07 '25 11:05 bprusinowski

@Rdataflow the issue is ready for review on TEST

sosiology avatar May 15 '25 15:05 sosiology