split image into google map tiles
Posted: 2013-03-09T14:35:54-07:00
I have a 2304 x 3584px image that I want to split up into 126 256x256 tiles.
I figured out how to do this...
convert -crop 256x256 t2_gmd_z8.bmp out2\tile.png
...but I cant figure out how to incorporate the x & y coordinate in the file name.
The big image's top left corner is google coords (121,73) so I want the tiles to be generated as:
tile_121_73.png, tile_122_73.png, .....
I have read the chapter: http://www.imagemagick.org/Usage/crop/#crop_tile
which suggests using fx but I cant get this to work.
Could someone supply me with the command I should use please.
I figured out how to do this...
convert -crop 256x256 t2_gmd_z8.bmp out2\tile.png
...but I cant figure out how to incorporate the x & y coordinate in the file name.
The big image's top left corner is google coords (121,73) so I want the tiles to be generated as:
tile_121_73.png, tile_122_73.png, .....
I have read the chapter: http://www.imagemagick.org/Usage/crop/#crop_tile
which suggests using fx but I cant get this to work.
Could someone supply me with the command I should use please.