I have MapServer 6.0.3 installed and running in my local machine. The same for Apache HTTP Server 2.2.22
I have created a .map file using NOTEPAD++ for a WCS service that I want to access using either QGIS and ArcMap as CLIENTS.
1.- When I use the URL:
http://localhost:80/cgi-bin/mapserv.exe?map=/ms4w/apps/raster.map
QGIS CAN list the service (see it), fine, but when I try to add the layer into the canvas it reports:
WCS provider: Cannot get test dataset.
Raster layer: Provider is not valid (provider: wcs, URI: cache=PreferNetwork&
crs=EPSG:4326&format=GTiff&identifier=gebco&url=http://localhost:80/cgi-bin
/mapserv.exe?map%3D/ms4w/tmp/raster.map
If I try adding a GDAL DRIVER (xml file), see below, as a RASTER file:
<WCS_GDAL>
<ServiceURL>http://localhost:80/cgi-bin/mapserv.exe?map=/ms4w/app/raster.map</ServiceURL>
<version>1.0.0</version>
<CoverageName>gebco</CoverageName>
<supportedCRSs>EPSG:4326</supportedCRSs>
<PreferredFormat>gtiff</PreferredFormat>
</WCS_GDAL>
I get the following error:
msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed.
msEvalRegex(): Regular expression error. String failed expression test.
2.- ArcMap only list (but again not displaying it) the image by adding just:
http://localhost:80/cgi-bin/mapserv.exe?map=/ms4w/apps/raster.map
So, the same problem as using QGIS..
3.- The only thing which seems to be working so far is adding the following URL into the browser:
http://localhost:80/cgi-bin/mapserv.exe?map=/ms4w/apps/raster.map
&SERVICE=wcs
&VERSION=1.0.0
&REQUEST=GetCoverage
&coverage=gebco
&CRS=EPSG:4326
&BBOX=32.4434100,-28.0,55.0017433,0.0
&WIDTH=2707&HEIGHT=3360
&FORMAT=GTiff
After that a pop-up window ask you to download a tiFF into your computer.
But again using either ArcMap or QGIS as clients I am not able to display the raster using MapServer.
My MAP FILE:
MAP
NAME WCS_server
STATUS ON
DEBUG ON
SIZE 2707 3360
PROJECTION
"init=epsg:4326"
END
EXTENT 32.4434100 -27.9999999974 55.0017433333 2.63999311301e-009
UNITS DD
SHAPEPATH "/ms4w/apps"
CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"
MAXSIZE 3361
OUTPUTFORMAT
NAME GEOTIFF_16
DRIVER "GDAL/GTiff"
MIMETYPE "image/tiff"
IMAGEMODE INT16
EXTENSION "tif"
END
WEB
IMAGEPATH "C:/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"wcs_label" "GMap WCS Demo Server"
"wcs_onlineresource" "http://localhost:80/cgi-bin/mapserv.exe?"
"wcs_enable_request" "*"
END
END
LAYER
NAME gebco
METADATA
"wcs_label" "gebco_blue"
"wcs_rangeset_name" "Range 1"
"wcs_rangeset_label" "My Label"
END
TYPE RASTER
STATUS ON
DATA gebco.tif
PROJECTION
"init=epsg:4326"
END
END
END
Checking the ms_error.txt for errors, it reports the following when accessing the service using QGIS:
[Wed Feb 26 11:41:55 2014].129000 CGI Request 1 on process 4936
[Wed Feb 26 11:41:55 2014].129000 msWCSParseRequest20(): WCS server error. Parameter
'Version' is already set.
[Wed Feb 26 11:41:55 2014].129000 msWCSDispatch20(): Parse error occurred.
[Wed Feb 26 11:41:55 2014].209000 CGI Request 1 on process 1900
[Wed Feb 26 11:41:55 2014].209000 msWCSDispatch20(): version and service are not
compliant with WCS 2.0.0
[Wed Feb 26 11:41:55 2014].209000 msWCSParseRequest(): request is KVP.
And when trying to add the layer to the map (QGIS):
[Wed Feb 26 11:54:05 2014].220000 CGI Request 1 on process 4472
[Wed Feb 26 11:54:05 2014].220000 msWCSParseRequest20(): WCS server error. Parameter
'Version' is already set.
[Wed Feb 26 11:54:05 2014].220000 msWCSDispatch20(): Parse error occurred.
[Wed Feb 26 11:54:08 2014].904000 CGI Request 1 on process 5892
[Wed Feb 26 11:54:08 2014].904000 msWCSParseRequest20(): WCS server error. Parameter
'Version' is already set.
[Wed Feb 26 11:54:08 2014].904000 msWCSDispatch20(): Parse error occurred.
[Wed Feb 26 11:54:08 2014].994000 CGI Request 1 on process 6072
[Wed Feb 26 11:54:08 2014].994000 msWCSDispatch20(): version and service are not
compliant with WCS 2.0.0
[Wed Feb 26 11:54:08 2014].994000 msWCSParseRequest(): request is KVP.
[Wed Feb 26 11:54:09 2014].84000 CGI Request 1 on process 5944
[Wed Feb 26 11:54:09 2014].84000 msWCSParseRequest20(): WCS server error. Parameter
'Version' is already set.
[Wed Feb 26 11:54:09 2014].84000 msWCSDispatch20(): Parse error occurred.
Now, when connecting the service via ArcGIS:
[Wed Feb 26 11:57:32 2014].802000 CGI Request 1 on process 5832
[Wed Feb 26 11:57:32 2014].802000 msWCSDispatch20(): version and service are not
compliant with WCS 2.0.0
[Wed Feb 26 11:57:32 2014].802000 msWCSParseRequest(): request is KVP.
[Wed Feb 26 11:57:32 2014].822000 Format 'png24' ignored since mimetype 'image/png'
duplicates another outputFormatObj.
[Wed Feb 26 11:57:32 2014].822000 Format 'GTiff' ignored since mimetype 'image/tiff'
duplicates another outputFormatObj.
[Wed Feb 26 11:57:32 2014].932000 CGI Request 1 on process 3540
[Wed Feb 26 11:57:32 2014].932000 msWCSDispatch20(): version and service are not
compliant with WCS 2.0.0
[Wed Feb 26 11:57:32 2014].932000 msWCSParseRequest(): request is KVP.
[Wed Feb 26 11:57:32 2014].932000 msWCSParseRequest(): Whole String: gebco
[Wed Feb 26 11:57:32 2014].932000 msLoadProjectionString(): Projection library error.
Unrecognised OGC CRS def 'urn:ogc:def:crs:OGC::imageCRS'.
And finally, when trying to display the image in ArcGIS:
[Wed Feb 26 12:00:57 2014].16000 CGI Request 1 on process 4632
[Wed Feb 26 12:00:57 2014].16000 msWCSDispatch20(): version and service are not
compliant with WCS 2.0.0
[Wed Feb 26 12:00:57 2014].16000 msWCSParseRequest(): request is KVP.
[Wed Feb 26 12:00:57 2014].16000 msWCSParseRequest(): Whole String: gebco
[Wed Feb 26 12:00:57 2014].16000 msLoadProjectionString(): Projection library error.
Unrecognised OGC CRS def 'urn:ogc:def:crs:OGC::imageCRS'.
[Wed Feb 26 12:00:58 2014].166000 CGI Request 1 on process 4440
[Wed Feb 26 12:00:58 2014].166000 msWCSDispatch20(): version and service are not
compliant with WCS 2.0.0
[Wed Feb 26 12:00:58 2014].166000 msWCSParseRequest(): request is KVP.
[Wed Feb 26 12:00:58 2014].166000 msWCSParseRequest(): Whole String: gebco
[Wed Feb 26 12:00:58 2014].166000 msWCSGetCoverageBands11(): WCS server error.
RangeSubset field name malformed, expected 'Range 1', got RangeSubset=Range
So, there are many things to have a look at, and obviously the errors in the ms_error.txt file gives us a clue, how to solve them?. But for instance, why it says:
version and service are not compliant with WCS 2.0.0?
When I am using VERSION=1.0.0 in the requests?
/ms4w/tmp/ms_error.txt
file?Service URL
you use in QGIS contains theGetCoverage
request and the coverage name, but it shouldn't. Then, the GDAL WCS driver is incomplete, because theCoverageName
and eventually theVersion
tags are missing. Also,png24
is not a suitableOUTPUTFORMAT
for a WCS coverage andGTiff
seems to be a duplicate.