[gdal-dev] Problem using gdalbuildvrt with a large number of source datasets

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Dec 3 02:13:12 PST 2014


Homme Zwaagstra <hrz <at> geodata.soton.ac.uk> writes:

> 
> Hello,
> 
> I've come up against a problem with `gdalbuildvrt` taking a long time to 
> create
> a VRT when it is passed a large number of source datasets. I am trying 
> to create
> a VRT file for a zoom level in a TMS structure containing JPEG tiles.  The
> command I'm using is:
> 
> gdalbuildvrt output.vrt `find ./tiles/18 -iname *.jpg -printf "%p "`
> 
> where the number of tiles is:
> 
> $ find ./tiles/18 -iname *.jpg | wc -l
> 767104

I would say that you are doing all wrong thing. First, the jpeg tiles in
tile service directory structure are not referenced with world files (.jgw)
or anything and your .vrt file would be useless.

The right thing to do is to study the file naming schema that the cache is
using. When the schema is known the right tile can be found directly because
the logic knows how the tile directory structure is like and which names are
used for the tiles. If it is an OSGeo TMS schema it is described here
http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#TileMapService_Resource

If it is using the Google/Bing tile naming schema then you can find examples
here http://www.gdal.org/frmt_wms.html. But if it is a GeoWebCache tile
cache you may be out of luck because I haven't seen so far any configuration
file that would make GWC tilecache usable for GDAL.

-Jukka Rahkonen-



More information about the gdal-dev mailing list