[Gdal-dev] Re: gdal_translate unable to allocate buffer

Even Rouault even.rouault at mines-paris.org
Fri Sep 28 13:24:49 EDT 2007


Wolfgang,

I think this is a known issue :  VRT made of several thousands of single 
images don't work (on Linux at least). Currently the VRT driver first opens 
all images before doing any translation to GTIF. And at a moment, you reach 
the limit of maximum simultaneous open files, which is 1024 on a typical 
Linux system.
See http://trac.osgeo.org/gdal/ticket/1781.
In this ticket, I've attached a patch called 
gdal_svn_gdalbuildvrt_with_proxy.patch which is not included in GDAL. It 
works for me (I can handle big VRT with it), but contains 
not-really-good-looking pieces of code that should be improved for inclusion 
in GDAL tree...  You would need to 
add -DUSE_GDAL_PROXY_FOR_VRT  -DI_CAN_LIVE_WITH_THIS_GDAL_PROXY_NASTY_THING 
on compilation line to get the best of it...

We should maybe document that problem in the VRT driver documentation for the 
moment and hope that someone comes with a better fix.
I think a better fix would be easier if we can extend the VRT XML format to 
add information about source files, such as width and height.

Even

On Friday 28 September 2007 09:03:46 WolfgangZ wrote:
> Even Rouault schrieb:
> > Hello,
> >
> > Can you provide more info on your source file : pasting the result of
> > gdalinfo on it would be a start.
> > Can you also paste your  gdal_translate command line ?
> >
> > Even
> >
> > On Thursday 27 September 2007 20:36:46 WolfgangZ wrote:
> >> I got an error from gdal_translate, has anybody an idea what the cause
> >> could be?
>
> the command line was:
>   gdal_translate -co TILED=YES -co COMPRESS=JPEG input.vrt out.tif
>
> the vrt file is a little bit bigger (458842,386026 pixel) and links
> together several (thousands) of single images.
>
> It takes some time but the progress bar started and I came to "0.", it
> would be a nice improvement if gdal_translate would not access all tiles
>   but only the needed ones (for example when using -srcwin).
>
> Regards
> Wolfgang
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev





More information about the Gdal-dev mailing list