0

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" "admin@gnone.world"
            "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?

  • 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 '18 at 13:49
  • HTTP 400 is bad request, so MapServer is telling you that your request is malformed. – nmtoken Jun 16 '18 at 14:00
1

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.

  • 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 – Albert Tinon Jun 14 '18 at 16:37
  • It is not my GeoServer but the test proves that ArcMap creates invalid DescribeCoverage. – user30184 Jun 14 '18 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 '18 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 – Albert Tinon Jun 14 '18 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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