visualization-tool
visualization-tool copied to clipboard
WMS / WMTS: Support formats other than PNG
PNG format is hardcoded for wmts / wms layers For better adherence to the spec, we should parse from the capabilities the formats that are present and ask for available formats, with png in priority so that we are able to set TRANSPARENT.
@ptbrowne while you may prefer png in cases both are available OTOH many WMTS only offer one single format, i.e. https://wmts.geo.admin.ch/EPSG/3857/1.0.0/WMTSCapabilities.xml offers jpeg for many layers (even if that one is not KVP, it still shows the clear trend: jpeg occurs frequently). It's a well defined param in the spec.
see also WMTS GetTile request.xsd
and OpenGIS Web Map Tile Service Implementation Standard p34
HTH for OCG conformance 👍
Originally posted by @Rdataflow in https://github.com/visualize-admin/visualization-tool/pull/2306#discussion_r2088521381