Ticket #3224 (new defect)
Problems with large raster sizes (WMS/TMS)
|Reported by:||tamas||Owned by:||warmerdam|
I've been testing with the WMS/TMS driver at large zoom levels according to the following WMS XML file:
<UpperLeftX>-20037508.34</UpperLeftX> <UpperLeftY>20037508.34</UpperLeftY> <LowerRightX>20037508.34</LowerRightX> <LowerRightY>-20037508.34</LowerRightY> <TileLevel?>20</TileLevel> <TileCountX>1</TileCountX> <TileCountY>1</TileCountY> <YOrigin>top</YOrigin>
</DataWindow> <Projection>EPSG:900913</Projection> <BlockSizeX>256</BlockSizeX> <BlockSizeY>256</BlockSizeY> <BandsCount?>3</BandsCount> <Cache />
# 1. By setting the TileLevel? to 19 everything is working fine. However when I increase the TileLevel? to 20 I always get the following error : "Out of memory in InitBlockInfo?()". This is beacause gdal tries to pre-allocate the pointers for all tiles in the internal memory cache. This issue can be handled by replacing the matrix based common block cache implementation with a hashtable based implementation.
# 2. When I set TileLevel? to 23 I get : 'Invalid dataset dimensions : -2147483648 x -2147483648'. In this case the raster size would exceed the INT_MAX limitation. As a quick and dirty solution we could limit the raster size to INT_MAX in the wms driver.
I've attached a patch to handle both cases.