mf-geoadmin3 icon indicating copy to clipboard operation
mf-geoadmin3 copied to clipboard

Import Italian WMSs

Open p1d1d1 opened this issue 7 years ago • 19 comments

GetMap request is asking for image size out of range. Max pixel is 2048.

p1d1d1 avatar Mar 15 '18 08:03 p1d1d1

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.

oterral avatar Mar 15 '18 09:03 oterral

Can we assume they changed something in their configuration? These imports have worked time ago.

p1d1d1 avatar Mar 15 '18 10:03 p1d1d1

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.

oterral avatar Mar 15 '18 10:03 oterral

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

p1d1d1 avatar Mar 15 '18 11:03 p1d1d1

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 avatar Mar 15 '18 11:03 oterral

@oterral EPSG:2056 is now supported, but import tool is still requesting EPSG:4326

p1d1d1 avatar Mar 28 '18 07:03 p1d1d1

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>

oterral avatar May 15 '18 09:05 oterral

This is 100% conform to OGC Spec. Kind layers inherit the CRS from the parent.

p1d1d1 avatar May 15 '18 09:05 p1d1d1

I know, That's what I said . There is a bug in OL.

oterral avatar May 15 '18 10:05 oterral

@p1d1d1 pls Open ticket directly in ol

davidoesch avatar May 15 '18 10:05 davidoesch

already done https://github.com/openlayers/openlayers/issues/8195

oterral avatar May 15 '18 11:05 oterral

PR on hold https://github.com/openlayers/openlayers/pull/8197

oterral avatar May 16 '18 16:05 oterral

Does it work or not? https://s.geo.admin.ch/7e1eaee2fa

procrastinatio avatar Nov 08 '18 12:11 procrastinatio

Works

davidoesch avatar Nov 08 '18 13:11 davidoesch

Not on big screens. It does work if I reduce the browser window.

p1d1d1 avatar Nov 08 '18 13:11 p1d1d1

... meaning the issue is still there. But I let you decide...

p1d1d1 avatar Nov 08 '18 13:11 p1d1d1

I pinged the openlayers https://github.com/openlayers/openlayers/pull/8197

davidoesch avatar Nov 08 '18 15:11 davidoesch

@boecklic what about this?

p1d1d1 avatar May 10 '19 10:05 p1d1d1

@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)

  • e.g. 1: https://s.geo.admin.ch/7e1eaee2fa with browser window to full screen sends the following getmap request:

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

  • e.g. 1: https://s.geo.admin.ch/7e1eaee2fa with resized browser window sends the following getmap request:

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

[1] http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/IGM_100000.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

p1d1d1 avatar May 10 '19 10:05 p1d1d1