Opened 14 years ago
Last modified 14 years ago
#3464 closed defect
gdal_translate cannot download from WMS interface at geoportal.cuzk.cz — at Initial Version
Reported by: | voland | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.8.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | WMS useragent |
Cc: | warmerdam |
Description
There is a WMS service in Czech Republic. It can be configured the following way:
<GDAL_WMS> <Service name="WMS"> <Version>1.3.0</Version> <ServerUrl>http://geoportal.cuzk.cz/wmsdata13/RASZM10/wms.asp?SID=&</ServerUrl>
<CRS>EPSG:32633</CRS> <ImageFormat>image/png</ImageFormat> <Layers>GR_ZM10</Layers> </Service>
<DataWindow> <UpperLeftX>540000</UpperLeftX> <LowerRightX>545000</LowerRightX> <LowerRightY>5608000</LowerRightY> <UpperLeftY>5614000</UpperLeftY>
<SizeX>2500</SizeX> <SizeY>3000</SizeY> </DataWindow>
<Cache> <Path>/cache</Path> <Depth>1</Depth> </Cache>
<MaxConnections>1</MaxConnections>
<BlockSizeX>500</BlockSizeX> <BlockSizeY>500</BlockSizeY>
</GDAL_WMS>
It can be run with the following command:
gdal_translate -of ENVI wms.xml test.envi
The very first URL generated by gdal_translate cannot be downloaded:
Input file size is 2500, 3000 0ERROR 1: GDALWMS: Unable to download block 0, 0.
URL:
HTTP status code: 200, error: (null).
ERROR 1: IReadBlock failed at X offset 0, Y offset 0 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
But if opened in Firefox, this URL is downloaded immediately.
It is possible that gdal_translate is missing something in HTTP Header like user agent, session ID or something that allows WMS server to check if it is a web browser or other piece of software.