Open p1d1d1 opened 6 years ago
It's a limitation of their WMS. there's nothing we can do. We could use a tiled WMS but we decide it is too risky because often external WMSs doesn't support the load.
Can we assume they changed something in their configuration? These imports have worked time ago.
Maybe it's caused by the change of projection to LV95 . What is the url of the WMS ?
If it doesn't support LV95 it's possible that the client reprojection affects the size of the requests.
It's a limitation of their WMS
I wouldn't consider this a limitation. A WMS Server can define a MaxWidth and a MaxHeight. It's up to the client to take into consideration these settings.
By the way the services do not support EPSG:2056 (they do support EPSG:21781). By the way map.geoa.dmin.ch is issuing request with EPSG:4326 (which is supported)
What is the url of the WMS ?
All pcn.minambiente.... we have in import tool
Yes exactly if EPSG:2056 is not supported map.geo.admin.ch will use the client reprojection requesting a tile in EPSG:4326 (because EPSG:4326 is always supported by a WMS) then reprojecting it in EPSG:2056.
So if you have a contact with them, tell them to add EPSG:2056 projection in their WMS GetCapabilities and everythink will work fine again.
@oterral EPSG:2056 is now supported, but import tool is still requesting EPSG:4326
To be sure it's working EPSG:2056 must be define in all the <Layer>
tags also.
It seems there is an inheritance problem when one layer has no CRS:
<Layer>
<Title>Cartografia di base - IGM 100.000</Title>
<CRS>EPSG:2056</CRS>
<Layer>
<Title>IGM 100.000</Title>
<Layer cascaded="0" opaque="0" queryable="0">...</Layer>
This is 100% conform to OGC Spec. Kind layers inherit the CRS from the parent.
I know, That's what I said . There is a bug in OL.
@p1d1d1 pls Open ticket directly in ol
already done https://github.com/openlayers/openlayers/issues/8195
Does it work or not? https://s.geo.admin.ch/7e1eaee2fa
Works
Not on big screens. It does work if I reduce the browser window.
... meaning the issue is still there. But I let you decide...
I pinged the openlayers https://github.com/openlayers/openlayers/pull/8197
@boecklic what about this?
@boecklic IMHO it's not related to CORS. It is related to the image size in the getmap request. The italian WMSs support [1]:
<MaxWidth>2048</MaxWidth>
<MaxHeight>2048</MaxHeight>
On big screens map.geo.admin.ch sends a getmap request with and image size that is not supported (e.g. width oder height > 2048)
http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/IGM_100000.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=MB.IGM100000.32&CRS=EPSG:4326&STYLES=&WIDTH=2783&HEIGHT=1027&BBOX=45.79190639816213,9.005658974490984,45.83797004477571,9.130483831867409
WIDTH is bigger than 2048
http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/IGM_100000.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=MB.IGM100000.32&CRS=EPSG:4326&STYLES=&WIDTH=1421&HEIGHT=690&BBOX=45.799476404528534,9.03618789948345,45.83042471627475,9.099923480630375
WIDTH and HEIGHT smaller than 2048 --> data is shown
GetMap request is asking for image size out of range. Max pixel is 2048.