How do I automate the import of raster tiffs into tile mill?

I have well over 100 files.

I have many warped tiff files ready to be imported as individual layers into tile mill so they can be saved out as a single mbtiles file.


You could try the GDAL utility, gdalbuildvrt, to create a mosaicked VRT as a raster input to TileMill. It seems to be a recommended approach.

  • ..hmm, I may have misunderstood your use case. apologies. but this might still be useful for someone who stumbles through with other intentions, so I'll leave the answer. – elrobis Jun 18 '14 at 16:19

If you really need 100 of layers, use gdal_merge 1.tif 2.tif ... 100.tif -o single.tif to merge them into one.

Alternatively, you may use the fact project.mml is a plain-text JSON file. Open in in a text editor (notepad will do), find a block corresponding to one of your raster layers, and copy it required number of times, changing tiff file name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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