1

I have a MapServer 7.0.7 map containing only a layer with a GeoTiff DEM.

It works perfectly with QGIS 3.0.3 but I cannot use it with ArcMap 10.5.

This is my map file:

MAP
  OUTPUTFORMAT
      NAME "GTiff"
      DRIVER GDAL/GTiff
      MIMETYPE "image/tiff"
      IMAGEMODE FLOAT32
      EXTENSION "tif"
    TRANSPARENT ON
  END

  NAME "Modèle numérique de terrain"
    EXTENT  -6.0001389 39.9998611 10.0001389 52.0001389
    MAXSIZE 4096
    PROJECTION
        "init=epsg:2154"
  END

  WEB
    METADATA
            "wcs_label"           "WCS Server"
            "wcs_onlineresource"  "http://localhost/cgi-bin/mapserv?map=/tmp/testNaN.map&"
            "wcs_enable_request" "*"
            "wcs_fees"            "none"
            "wcs_accessconstraints"    "none"
            "wcs_keywordlist"          "wcs,dem"
            "wcs_metadatalink_type"    "TC211"
            "wcs_metadatalink_format"  "text/plain"
            "wcs_metadatalink_href"    "http://localhost"
            "wcs_address"              ""
            "wcs_city"                 "Paris"
            "wcs_stateorprovince"      "IDF"
            "wcs_postcode"             "75000"
            "wcs_country"              "France"
            "wcs_contactelectronicmailaddress" "[email protected]"
            "wcs_contactperson"            "me"
            "wcs_contactorganization"      "unemployed"
            "wcs_contactposition"          "manager"
            "wcs_contactvoicetelephone"    ""
            "wcs_contactfacimiletelephone" ""
      END
    END

  LAYER
        NAME TESTNAN
          DATA "/tmp/tmp.tif"
        STATUS ON
        TYPE RASTER
        PROCESSING "SCALE=AUTO"
        PROJECTION
           "init=epsg:2154"
        END
    METADATA
      "Altitude_band_description" "Altitude en mètres"
      "wcs_band_names" "Altitude"
      "wcs_bandcount" "1"
      "wcs_description" "Modèle numérique de terrain"
      "wcs_enable_request" "*"
      "wcs_label" "IGN BDAlti V2 (rés: 75m)"
      "wcs_name" "BDALTI75"
      "wcs_rangeset_label" "IGN BDAlti V2 (rés: 75m)"
      "wcs_rangeset_name" "BDALTI75"
      "wcs_rangeset_nullvalue" "-99999"
      "wcs_srs" "EPSG:2154"
    END
  END
END

While I add my WCS server under ArcMap 10.5 without forcing the version. ArcMap makes two HTTP GET request

:/1 - - [14/Jun/2018:16:56:14 +0200] "GET /cgi-bin/mapserv?map=/tmp/testNaN.map&SERVICE=WCS&SERVICE=WCS&REQUEST=GetCapabilities HTTP/1.1" 200 6816
::1 - - [14/Jun/2018:16:56:14 +0200] "GET /cgi-bin/mapserv?map=/tmp/testNaN.map&SERVICE=WCS&SERVICE=WCS&VERSION=2.0.1&REQUEST=DescribeCoverage HTTP/1.1" 400 536

As you can see the second request does not work and Mapserver answer a HTTP 400 error.

While entering this request in Chrome I can have the full error:

msWCSDescribeCoverage20(): WCS server error. Missing COVERAGEID parameter.

the only workaround I found is to force the version to 1.0.0

How do I make MapServer understand ArcMap WCS 2.0.1 protocol?

4
  • There is no such thing as the ArcMap WCS protocol. There is instead the OGC WCS interface standard. So the question is, is it ArcMap that is interpreting the standard correctly in making requests, or is it MapServer in its response
    – nmtoken
    Jun 16, 2018 at 13:49
  • HTTP 400 is bad request, so MapServer is telling you that your request is malformed.
    – nmtoken
    Jun 16, 2018 at 14:00
  • I am facing similar version problem in Arcgis to read my WCS service. Qgis is working everything perfect, but it can not be read mapfile by defult in ArcGIS. How did you solve the problem...? Is there a solution at all? Jul 28, 2020 at 9:46
  • does it really ask the service type twice like SERVICE=WCS&SERVICE=WCS&
    – nmtoken
    Jul 28, 2020 at 10:46

1 Answer 1

3

Your question should be how to make ESRI to fix their bug.

Table 11 — WCS DescribeCoverage components in the WCS 2.0.1 core standard states that coverageId is a mandatory parameter in DescribeCoverage request and the value must be one or more coverage names.

If you have only one coverage in your service a workaroud could be to add a rewrite rule to the Apache server to add &coverageId=your_coverage into the non-standard request that ArcMaps makes.

I wonder if ArcMap behaves always like that or if there is something special in your MapServer configuration. GeoServer requires coverageId as well as you can test with

https://demo.geo-solutions.it/geoserver/wcs?service=WCS&version=2.0.1&request=DescribeCoverage&

Could you test if ArcMap can add coverages from that service?

BTW. Why do you have SCALE=AUTO in your mapfile? I am not sure if it has an effect on WCS service, but if it does then it alters your data which is not the purpose of WCS.

4
  • your geoserver answers an error but not exactly the same, I got a 404 error. But forcing the version to 1.0.0 makes it working Jun 14, 2018 at 16:37
  • It is not my GeoServer but the test proves that ArcMap creates invalid DescribeCoverage.
    – user30184
    Jun 14, 2018 at 16:39
  • Actually http 404 error feels odd, it means Not found. Can you see what request ArcMap really makes for the GeoServer?
    – user30184
    Jun 14, 2018 at 16:43
  • No i cannot view, even by sniffing the request because of the htps scheme. I've just discovered that QGis 3.0.3 only request WCS 1.0.0 or WCS 1.1.0, so it cannot be compared to ArcMap. SERVICE=WCS&REQUEST=GetCapabilities&AcceptVersions=1.1.0,1.0.0 Jun 14, 2018 at 17:02

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.