Difference between revisions of "Miscellaneous Scenery Tools"

From Silent Wings Wiki
Jump to: navigation, search
(New page: <b>chop.py</b> [http://addons.silentwings.no/index.php?module=Downloads&func=view&cid=3 chop.py] is a Python script that chops up a GeoTIFF (georeferenced TIFF image) into a grid of equal...)
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
==build_config.pl==
 +
 +
This perl script will generate terrain block directories with config files for a given area.
 +
 +
Usage:
 +
 +
  build_config.pl <template file> <min latitude> <min longitude> <max latitude> <max longitude>
 +
 +
Example:
 +
 +
  $GGFX/etc/build_config.pl terrain.tpl -36 -72 -30 -68 
 +
 +
The template file must be set up with paths to the various data sources, both DEM data for the terrain generator and image data for the texture mapper can be put into this file.
 +
 +
See the included terrain.tpl file for an example.
 +
 +
Both the perl script and the template file are included in the terrain tools distribution, but they can also be downloaded directly:
 +
 +
[http://download.silentwings.no/devtools/build_config.pl build_config.pl]
 +
[http://download.silentwings.no/devtools/terrain.tpl terrain.tpl]
 +
 
<b>chop.py</b>
 
<b>chop.py</b>
  
[http://addons.silentwings.no/index.php?module=Downloads&func=view&cid=3 chop.py] is a Python script that chops up a GeoTIFF (georeferenced TIFF image) into a grid of equal size pieces.
+
[http://addons.silentwings.no/index.php?module=Downloads&func=view&cid=3 chop.py] is a Python script that chops up a GeoTIFF (georeferenced TIFF image) into a grid of equal size pieces.<br>
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.
+
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.<br>
 
chop.py uses utilities from the [http://www.gdal.org/ GDAL] library which must be installed.
 
chop.py uses utilities from the [http://www.gdal.org/ GDAL] library which must be installed.
  
chop.py has two basic modes of operation : size and piece.
+
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 :
 
To chop an image into pieces with each piece having a maximum size of 5000 by 4000 pixels :

Latest revision as of 21:51, 19 December 2008

build_config.pl

This perl script will generate terrain block directories with config files for a given area.

Usage:

 build_config.pl <template file> <min latitude> <min longitude> <max latitude> <max longitude>

Example:

 $GGFX/etc/build_config.pl terrain.tpl -36 -72 -30 -68  

The template file must be set up with paths to the various data sources, both DEM data for the terrain generator and image data for the texture mapper can be put into this file.

See the included terrain.tpl file for an example.

Both the perl script and the template file are included in the terrain tools distribution, but they can also be downloaded directly:

build_config.pl terrain.tpl

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