Miscellaneous Scenery Tools

From Silent Wings Wiki
Revision as of 15:41, 16 April 2007 by Surge (talk | contribs)
Jump to: navigation, search

chop.py

chop.py is a Python script that chops up a GeoTIFF (georeferenced TIFF image) into a grid of equal size pieces.
This is particularly useful if you need to touch up a large aerial or satellite image in a graphics application such as GIMP or Photoshop and one doesn't have enough RAM for the entire image to fit into.
chop.py uses utilities from the GDAL library which must be installed.

chop.py has two basic modes of operation : size and pieces.

To chop an image into pieces with each piece having a maximum size of 5000 by 4000 pixels :

chop.py -s 5000 4000 input.tif output.tif

To chop an image into 2 horizontal by 4 vertical pieces :

chop.py -p 2 4 input.tif output.tif

If you would like to create TIFF World files for the output images pass the -t or -tifw program argument. That will ensure that when you modify and save the images in an application that doesn't honor the georeferencing tags (such as GIMP and Photoshop) the georeferencing information will not be lost.

If you would like the pieces to have an overlap so that they can be seamlessly mosaiced back together again you can specify the overlap in pixels with the -o or --overlap program argument.

Full example with maximum piece size of 3000 by 3000 pixels, 10 pixel overlap between pieces and TIFF World file creation :

chop.py -s 3000 3000 -t -o 10 input.tif output.tif