Opened 17 years ago
Closed 5 years ago
#1833 closed defect (wontfix)
Can't open WCS coverages with names with embedded spaces and special characters
Reported by: | gaopeng | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | WCS |
Cc: | rblazek |
Description (last modified by )
Connect to the following wcs server
http://laits.gmu.edu/cgi-bin/NWGISS/NWGISS?
and try to open AUTUMN Matthews Autumn..., about ~25th coverage in the list. It won't open.
Here is the content of the .wcs file, notice that Coverage Name element contains white space
<WCS_GDAL> <ServiceURL>http://laits.gmu.edu/cgi-bin/NWGISS/NWGISS?</ServiceURL><CoverageName>/export/home0/GeoData/AVHRRandUSGS/AUTUMN.hdf:Grid:Matthews Autumn Albedo Global Data Set:Matthews Autumn Albedo Global Data Set</CoverageName><Timeout>90</Timeout><Resample>nearest</Resample></WCS_GDAL>
Change History (7)
comment:1 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 15 years ago
Description: | modified (diff) |
---|
FWIW - this seems to work:
<WCS_GDAL> <ServiceURL>http://laits.gmu.edu/cgi-bin/NWGISS/NWGISS?</ServiceURL> <CoverageName>AUTUMN.hdf</CoverageName> <Timeout>90</Timeout> <Resample>nearest</Resample> </WCS_GDAL>
comment:3 by , 12 years ago
Cc: | added |
---|
There is the same problem with RangeSubset in 1.1, for example
RangeSubset=Range 1[bands[1]]
does not work. This must be fixed GDAL.
What was the conclusion? The ServiceURL should be given escaped while CoverageName unescaped?
comment:4 by , 12 years ago
Version: | 1.4.1 → svn-trunk |
---|
comment:5 by , 12 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | WCS added |
Radim, could you post a current .wcs file demonstrating the problem?
comment:6 by , 12 years ago
There is no file actually. I am implementing a GUI for GDAL WCS in QGIS (https://github.com/blazek/Quantum-GIS branch wcs). The XML is created on the fly and passed as string to GDALOpen.
For testing, I have created a local server with mapserver 6.0.2 using their example configuration with
METADATA "wcs_rangeset_name" "Range 1" END
The string given to GDALOpen:
<WCS_GDAL><Version>1.1.0</Version><ServiceURL>http://127.0.0.1/ms-wcs/?</ServiceURL><CoverageName>dem_gtopo30</CoverageName><PreferredFormat>image/tiff</PreferredFormat><GetCoverageExtra>&RESPONSE_CRS=EPSG:4326</GetCoverageExtra></WCS_GDAL>
GDAL debug:
HTTP: Fetch(http://127.0.0.1/ms-wcs/?SERVICE=WCS&VERSION=1.1.0&REQUEST=GetCoverage&IDENTIFIER=dem_gtopo30&FORMAT=image%2Ftiff&BOUNDINGBOX=12.1000008552271,51.0444652085641,12.1083358990147,51.052784699151,urn:ogc:def:crs:EPSG::4326&RangeSubset=Range 1&RESPONSE_CRS=EPSG:4326) ERROR 1: msWCSGetCoverageBands11(): WCS server error. RangeSubset field name malformed, expected 'Range 1', got RangeSubset=Range
I think that this is a bug in GDAL but it may be also in Mapserver. There is also another bug in Mapserver, it does not implement RangeSubset in WCS 1.1 at all so that if I change "Range 1" to "Range1", it fails later with
"Returned tile does not match expected band count"
comment:7 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
This is an url escaping problem. I *think* the right thing to do would be to expect the <ServiceURL> contents to be already URL escaped (ie. spaces converted to %20) while I think we should not expect this of the <CoverageName> field. So that means the driver would be responsible for doing the escaping as it builds the url.
Does this logic seem reasonable? Presumably it should be applied to other portions of the url as well.
The downside of a change is that it may be incompatible with .wcs files create for older versions where the creator has to url escape the covername ahead of time.