Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is similar to a question asked by someone else, re OS tiles, however, there is a difference! I am a bit of a amateur in GIS and python, but if I take it slow I can usually just about work it out!

This one though: I have a large amount(over 10k) of geo-refd png files which I have mosaicked in Arc, but also want to be able to access them in other programs such as QGIS over the web and within a private network using Geoserver - so I have tried creating VRT's with them, and sometimes it works, but sometimes it doesn't: it seems that on selecting over 200-odd png's, the vrt stops being created: is there a limit on the amount of rasters for a VRT, or can some-one give me some help please!! This is so frustrating ;o) The error message is: "The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program."

and the code is:

    gdalbuildvrt -allow_projection_difference 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/SX.vrt" 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/1.png" 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/2.png" 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/3.png" 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/4.png" 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/5.png" 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/6.png" 
    "F:/Historic Buildings/GIS/Data/Mapping/Landranger/Raster/15k/Data/SX/7.png"

with an additional +200 similarly addressed png's

I am using QGIS 1.8.0 Lisboa, on W7 64bit

Any help would be gratefully received

share|improve this question

Have you tried it sucessfully with a handfull of files?

For me, it worked with 300 files. At first, I had to build individual vrts for each image to expand the colour information to rgba:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt

Second run, I merged all those vrts to a single one:

gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt

Maybe the command line arguments are limited in character size, which I got around by using the wildcards.

share|improve this answer
Hey AndreThanks for this - yes, I create the vrt with upto about 200 or so files, but after that it seems to refuse. I will ahve a play around with the code, and see if I can save some time and expand the colour on a group, and then merge - I was having a problem merging them, as they were all resulting in blackness, so thanks also for the help/tip re merging and creating rgba's beforehand! – Simonrp Mar 9 '13 at 11:45
I will report back when I have a play around - it wont be for a couple of days though as have a busy weekend ahead! – Simonrp Mar 9 '13 at 11:46

Andre Joost had the correct answer in his last statement.

Its a character limit. If you use the wildcard it runs fine. I just tried on 28000 tiffs and it ran no problem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.