Opened 15 years ago
Closed 15 years ago
#2647 closed defect (fixed)
WMS driver fails when some blocks are already in block cache
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.0 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | wms |
Cc: | nowakpl |
Description
With the following dataset test.xml:
<GDAL_WMS> <Service name="WMS"> <Version>1.1.1</Version> <ServerUrl>http://127.0.0.1:8080/wms.cgi?</ServerUrl> <SRS>EPSG:4326</SRS> <ImageFormat>image/jpeg</ImageFormat> <Layers>modis,global_mosaic</Layers> <Styles></Styles> </Service> <DataWindow> <UpperLeftX>-180.0</UpperLeftX> <UpperLeftY>90.0</UpperLeftY> <LowerRightX>180.0</LowerRightX> <LowerRightY>-90.0</LowerRightY> <SizeX>2666666</SizeX> <SizeY>1333333</SizeY> </DataWindow> <Projection>EPSG:4326</Projection> <BandsCount>3</BandsCount> </GDAL_WMS>
where wms.cgi is a fake CGI WMS server (to avoid being blacklisted by online web server) that always returns a 1024x1024 black JPEG image, the current WMS driver will fail when doing :
apps/gdal_translate -outsize 0.2% 0.2% test.xml test.tif
The error will be "GDALWMS: GetDataRef returned NULL"
The reason is that because of the default values for GDAL_CACHEMAX and GDAL_SWATH_SIZE, GDALDatasetCopyWholeRaster() will sometimes cause the same WMS request to be issued serveral times for reading the same block but in different bands. But ReadBlockFromFile() in the WMS driver is not ready to deal with that.
Fix to follow.
Attachments (1)
Change History (3)
by , 15 years ago
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Source code for a fake CGI WMS server that always return a 1024x1024 black JPEG image