wiki:FITS

FITS

FITS is the standard data format used in Astronomy. It is endorsed by NASA and the International Astronomical Union.

GDAL provides basic support of FITS via the CFITSIO library (see the FITS driver documentation).

Building with CFITSIO

Linux

From source

  • Install CFITSIO headers from your distro (eg, cfitsio-devel on Fedora; libcfitsio-dev on Debian-Ubuntu)
  • Download the GDAL source in a gdal directory
    $ cd gdal/gdal

    $ ./autogen.sh

    $ ./configure

    $ make -j8 -s

    $ sudo make install

Your config.log will contain the following (depending on your distribution and install):

EXTRA_INCLUDES='-I/usr/include/cfitsio '

LIBS='-lcrypto -lexpat -ljasper -ljpeg -lgeotiff -ltiff -lpng -lcfitsio -lz -lpthread -lm -lrt -ldl  -lpcre'

From distro (tested on Fedora and Debian-Ubuntu)

  • Install CFITSIO headers from your distro (eg, cfitsio-devel on Fedora; libcfitsio-dev on Debian-Ubuntu)
  • Install GDAL from your distro (eg gdal-libs on Fedora; libgdal on Debian-Ubuntu)

CFITSIO is automatically detected and linked (sometimes a reboot is needed).

NOTA BENE

If you are interested in using GDAL in python be aware that some users report conflicts between the conda gdal installation and the compilation from source on linux.

Mac OS X

GDAL installation on Mac OS X is described here. The last version of the .dmg is not linked against CFITSIO.

From source

(thanks to Susan Borda)

    $ cd gdal/gdal

    $ ./autogen.sh

    $ ./configure

    $ make -j8 -s

    $ sudo make install
Last modified 12 months ago Last modified on Jul 13, 2018 1:55:27 AM