Wow, Jon fantastic progress. Being able to read the GDAL overviews seems like the exact feature needed here for these big datasets.
The first test I did to prompt the memory error was exactly as you imagined - trying to view a single small overview of the whole dataset. I would imagine that the GDAL interface should be relatively similar across formats. I look forward to testing this patch tomorrow. Cheers, Dane On Oct 25, 2008, at 4:50 PM, Jon Burgess wrote: > On Sat, 2008-10-25 at 22:56 +0100, Jon Burgess wrote: >> Traceback (most recent call last): >> File "./nik2img.py", line 571, in <module> >> render(mapnik_map,o,FORMAT) >> File "./nik2img.py", line 188, in render >> mapnik.render_to_file(*args) >> MemoryError >> >> I'm not certain at this point whether this is a bug in the test setup >> or >> a fundamental flaw in the Mapnik GDAL handling. I guess the approach >> of >> turning the source file into a bitmap works fine for normal sized >> images >> but falls down when faced with such an enormous raw bitmap. >> >> Mapnik would be much better off it could extract lower resolution >> image >> from the multi-resolution file. I don't know if GDAL exports this >> aspect >> of the file through the API. If not, it might need a special MrSID >> input >> plugin in Mapnik. >> > > GDAL exposes the lower resolutions via overviews. I put together a > quick > test and it appears to work. The patch is attached. It is definitely > _not_ ready to be merged. Currently just picks the smallest overview > greater than 1000 pixels wide. > > In reality it needs to be selecting the best overview for the current > query and I've no idea how this will work for other GDAL image > formats. > > Jon > > > <mapnik-gdal-downsize.patch> _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

