FITS – Flexible Image Transport System

Driver short name


FITS is a format used mainly by astronomers, but it is a relatively simple format that supports arbitrary image types and multi-spectral images, and so has found its way into GDAL. FITS support is implemented in terms of the standard CFITSIO library, which you must have on your system in order for FITS support to be enabled (see compilation instructions on trac). Both reading and writing of FITS files is supported. Starting from version 3.0 georeferencing system support is implemented via the conversion of WCS (World Coordinate System) keywords.

Non-standard header keywords that are present in the FITS file will be copied to the dataset’s metadata when the file is opened, for access via GDAL methods. Similarly, non-standard header keywords that the user defines in the dataset’s metadata will be written to the FITS file when the GDAL handle is closed.

Note to those familiar with the CFITSIO library: The automatic rescaling of data values, triggered by the presence of the BSCALE and BZERO header keywords in a FITS file, is disabled in GDAL < v3.0. Those header keywords are accessible and updatable via dataset metadata, in the same was as any other header keywords, but they do not affect reading/writing of data values from/to the file. Starting from version 3.0 BZERO and BSCALE keywords are managed via standard GDALRasterBand::GetOffset() / GDALRasterBand::SetOffset() and GDALRasterBand::GetScale() / GDALRasterBand::SetScale() GDAL functions and no more referred as metadata.

NOTE: Implemented as gdal/frmts/fits/fitsdataset.cpp.

Driver capabilities

Supports CreateCopy()

This driver supports the GDALDriver::CreateCopy() operation

Supports Create()

This driver supports the GDALDriver::Create() operation

Supports Georeferencing

This driver supports georeferencing

Supports VirtualIO

This driver supports virtual I/O operations (/vsimem/, etc.)