1

I would like to download a terrestrial image from a WMS server. The Save as option in QGIS didn't work, so I tried to download it with the r.in.wms command from the GRASS shell as described at SE: Save a WMS layer on your Hard Drive via QGIS?. However, the r.in.wms module is broken (the method option is used twice in the run command and throws the error Option <method> does not accept multiple answers) and when I use the GRASS Shell of the above mentioned plugin I do get an HTTP error:

r.in.wms url=http://85.18.173.22:8080/DbMAP_WMS/ORTOFOTO_2011/WMSservlet output=Orthofoto_2011 layers='Egeos 2011' wms_version=1.1.1 srs=3003 format=png

GRASS_INFO_ERROR(44976,1): HTTP Error 505: HTTP Version Not Supported

Does anybody know what that error means or how I can fix it?

2 Answers 2

2

I just tried and the problem is the layer name. Grass gis has problems with the space in the layer name. It does work when you input the layer name as "Egeos%202011". Substituting the space (%20) or other special characters with the % notation often helps in html context.

1

It seems to be saying it doesn't support your version.

First fetch the getcapabilites document - which seems to indicate it should support version=1.1.1

<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://85.18.173.22:8080/DbMAP_WMS/capabilities_1_1_1.dtd" [<!ELEMENT VendorSpecificCapabilities EMPTY>]>
<WMT_MS_Capabilities version="1.1.1" updateSequence="1491294758094">
    <Service>
        <Name>OGC:WMS</Name>
        <Title>DbMAP WMS</Title>
        <Abstract>DbMAP WMS by ABACO S.p.A. (www.abacogroup.com)</Abstract>
        <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://www.abacogroup.com/"/>
    </Service>
    <Capability>
        <Request>
            <GetCapabilities>
                <Format>application/vnd.ogc.wms_xml</Format>
                <DCPType>
                    <HTTP>
                        <Get>
                            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://85.18.173.22:8080/DbMAP_WMS/ORTOFOTO_2011/WMSservlet?" />
                        </Get>
                        <Post>
                            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://85.18.173.22:8080/DbMAP_WMS/ORTOFOTO_2011/WMSservlet?" />
                        </Post>
                    </HTTP>
                </DCPType>
            </GetCapabilities>
            <GetMap>
                <Format>image/gif</Format>
                <Format>image/png</Format>
                <Format>image/jpeg</Format>
                <Format>image/bmp</Format>
                <Format>image/svg+xml</Format>
                <DCPType>
                    <HTTP>
                        <Get>
                            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://85.18.173.22:8080/DbMAP_WMS/ORTOFOTO_2011/WMSservlet?" />
                        </Get>
                    </HTTP>
                </DCPType>
            </GetMap>
            <GetFeatureInfo>
                <Format>text/html</Format>
                <DCPType>
                    <HTTP>
                        <Get>
                            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://85.18.173.22:8080/DbMAP_WMS/ORTOFOTO_2011/WMSservlet?" />
                        </Get>
                    </HTTP>
                </DCPType>
                <Format>text/xml</Format>
            </GetFeatureInfo>
        </Request>
        <Exception>
            <Format>application/vnd.ogc.se_xml</Format>
        </Exception>
        <Layer>
        <Name>_Main_Layer_</Name>
        <Title>Main Layer</Title>
        <SRS>EPSG:3004</SRS>
        <LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/>
        <BoundingBox SRS="EPSG:3004" minx="2249990.0" miny="4594199.0" maxx="2378813.75" maxy="4681672.0"/>
            <Layer>
                <Name>Egeos 2011</Name>
                <Title>Egeos 2011</Title>
        <BoundingBox SRS="EPSG:3004" minx="2249990.0" miny="4594199.0" maxx="2378813.75" maxy="4681672.0"/>
            </Layer>

        </Layer>
    </Capability>
</WMT_MS_Capabilities>

So next you need to check your layer name (Egeos 2011), format (image/png) and SRS (3003) and only epsg:3004 is supported which is probably the problem.

Though the fact the server lies about it's lat/lon bounds may also cause a problem, if there were any contact details I'd complain to the owner.

3
  • Thank you for the hints! What puzzles me is that adding the wms layer with the Add WMS Layer tool in QGIS works but you can't make a local copy of it. Do you think that the QGIS tool just ignores the inconsistencies in the getcapabilities document? Apr 6, 2017 at 13:55
  • there may be size limit on downloads? a test download at a resolution of 100 worked fine
    – Ian Turton
    Apr 6, 2017 at 14:17
  • I couldn't find any size limits but the reason why the QGIS Save as command didn't worked in the first place was that I selected the "Extend" option to save only a small detail of the terrestrial image. It turned out that the server doesn't support that. Apr 6, 2017 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.