WMS URL – How to Get WMS URL from a Map Embedded in a Webpage

urlweb serviceweb-mappingwms

Objective

I am trying to download the images (or the vector files if possible) from a map embedded in the following webpage https://www4.sii.cl/mapasui/internet/#/contenido/index.html

enter image description here

Context

To see the layers you need to click Catálogo Mapas enter image description here and then chose Region, City and layer, for example "XVIII DIRECCION REGIONAL DE ARICA Y PARINACOTA"->"ARICA"->"Predios".

Inspecting the webpage I realized it uses a WMS request, for example: "https://www4.sii.cl/mapasui/services/ui/wmsProxyService/call?service=WMS&request=GetMap&layers=sii:BR_CART_ARICA_WMS&styles=PREDIOS_WMS_V0&format=image/png&transparent=true&version=1.1.1&comuna=1101&eac=0&eacano=0&height=256&width=256&srs=EPSG:3857&bbox=-7825622.9558363445,-2093457.3306744064,-7825317.2023204,-209351.5825612664"

My first attempt was trying to connect to the WMS from QGIS, but I couldn't figure out the correct URL (there is no documentation either). Secondly, I tried to change the parameters of the request, but the image doesn't show when anything is changed.

Question

Any ideas of how to download this layers?
I think the easiest way would be to infer the WMS URL but maybe there are other options.

Best Answer

The URL to append request parameters is just:

https://www4.sii.cl/mapasui/services/ui/wmsProxyService/call?

Normally, you would expect a GetCapabilities request to work

like:

https://www4.sii.cl/mapasui/services/ui/wmsProxyService/call?service=WMS&requst=GetCapabilities&

or for specific versions like:

https://www4.sii.cl/mapasui/services/ui/wmsProxyService/call?service=WMS&requst=GetCapabilities&version=1.1.1

but neither of these work, so it may be that the service provider has switched these responses off; possibly they weren't intending anybody else to use the service in their own software clients. Clients like QGIS need a working GetCapabilities response to know what they can offer to the user; so I think it's unlikely you'll find anything to work with QGIS.

The service is working though to give images, your example request gives:

GetMap request

So possibly you can hand crank some requests for your needs by changing the image size (height=256&width=256&) and bounding box (bbox=-7825622.9558363445,-2093457.3306744064,-7825317.2023204,-209351.5825612664&)

like (bbox=-7825317.2023204,-2093457.3306744064,-7825011.448804455,-209351.5825612664):

changing bounding box

Related Question