Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a collection of PNG files that use the standard google maps projection and have baked into the filename of each the zoom level (all of them are at 22), the x and y pixel coordinates of the starting tile at that zoom and the number of tiles wide and tall for each image. I've used MapTiler.app to successfully cut PNG tiles from this image at lower zooms by manually specifying "georeference with bounding box" with the four West South East North coordinates (I created these by generating lat/lng coordinates from the x/y coordinates using JavaScript and the google maps API). I see that MapTiler is essentially a GUI wrapper for gdal2tiles.py and so what I would like to do is programmatically cut my PNGs into tiles with a shell script that calls gdal2tiles.py. I've tried using gdal2tiles but am not sure how to use the pixel world coordinates in the PNG filenames. Looking at the documentation:


I don't see how I could use a shell script to take those pixel coordinates and let gdal2tiles know where these tiles belong. Help?

share|improve this question
add comment

Your Answer


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

Browse other questions tagged or ask your own question.