Skip to content

titan cogify

Create a Cloud-optimized GeoTIFF from an input raster file.

>>> titan cogify --help

titan cogify [-h] [-r resampling] [--co creation_option [creation_option ...]] [-b band [band ...]]
             [--ot data_type] [--dstnodata value] [--stats]
             input_file output_file

Converts raster files to cloud-optimized geotiffs.

positional arguments:
  input_file            The raster to cloud-optimize.
  output_file           The output COG path.

optional arguments:
  -h, --help            show this help message and exit
  -r resampling         GDAL resampling option
  --co creation_option [creation_option ...]
                        GDAL creation option arguments
  -b band [band ...]    Band(s) to process
  --ot data_type        GDAL data type
  --srcnodata value     Input nodata value (default: None)
  --te xmin ymin xmax ymax
                        Geographic extent (default: None)
  --srcwin xoff yoff xsize ysize
                        Raster subwindow extent (default: None)
  --ignore-overviews    Force overwrite overviews.
  --stats               Compute output raster statistics
  --ovr OVR [OVR ...]   Custom overview levels.
  --temp-dir path       Temp files for processing remote input files.
  --keep-temp           Dont delete temporary directory.

This routine includes a series of default best-practice options for creating COGs. You can overwrite some of these patterns by specifying custom --co creation options. Some are required by the COG format (like TILED=YES) and will be included regardless of the user-set creation options.

Reads from and writes to google cloud storage, which requires the creation of temporary overviews or local dataset copies prior to pushing data to GCS. The location of these temp files is controlled via --temp-dir, though it uses the local runtime directory (.) by default.