Driver short name


Driver built-in by default

This driver is built-in by default


PDS3 datasets can incorporate a VICAR header. By default, GDAL will use the PDS driver in that situation. Starting with GDAL 3.1, if the GDAL_TRY_PDS3_WITH_VICAR configuration option is set to YES, the dataset will be opened by the VICAR driver.

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.)


Starting with GDAL 3.1, the VICAR label can be retrieved as JSon-serialized content in the json:VICAR metadata domain.

For example:

$ python
from osgeo import gdal
ds = gdal.Open('../autotest/gdrivers/data/test_vicar_truncated.bin')


$ gdalinfo -json ../autotest/gdrivers/data/test_vicar_truncated.bin -mdd all

Binary prefixes

Starting with GDAL 3.1, if the VICAR label declares a non-zero binary prefix length (NBB label item), then GDAL will look in the vicar.json configuration file if there is an entry corresponding to the BLTYPE label item (currently only M94_HRSC is defined), and if there is a match, a OGR vector layer will be available on the dataset, with a feature for each image record.

For example:

$ ogrinfo h0038_0000.bl2.16 -al -q

Layer name: binary_prefixes
    EphTime (Real) = 127988268.646895
    Exposure (Real) = 40.1072692871094
    COT (Integer) = 28275
    FEETemp (Integer) = 28508
    FPMTemp (Integer) = 29192
    OBTemp (Integer) = 28295
    FERT (Integer) = 27001
    LERT (Integer) = 28435
    CmpDataLen (Integer) = 146
    FrameCount (Integer) = 486
    Pischel (Integer) = 5
    ActPixel (Integer) = 5120
    RSHits (Integer) = 0
    DceInput (Integer) = 0
    DceOutput (Integer) = 4
    FrameErr1 (Integer) = 0
    FrameErr2 (Integer) = 0
    Gob1 (Integer) = 0
    Gob2 (Integer) = 0
    Gob3 (Integer) = 0
    DSS (Integer) = 97
    DecmpErr1 (Integer) = 0
    DecmpErr2 (Integer) = 0
    DecmpErr3 (Integer) = 0
    FillerFlag (Integer) = 5

Creation support

Starting with GDAL 3.1, the VICAR driver supports updating imagery of existing datasets, creating new datasets through the CreateCopy() and Create() interfaces.

When using CreateCopy(), gdal_translate or gdalwarp, an effort is made to preserve as much as possible of the original label when doing VICAR to VICAR conversions. This can be disabled with the USE_SRC_LABEL=NO creation option.

The available creation options are:

  • COORDINATE_SYSTEM_NAME=PLANETOCENTRIC/PLANETOGRAPHIC. Value of MAP.COORDINATE_SYSTEM_NAME. Defaults to PLANETOCENTRIC. If specified, and USE_SRC_MAP is in effect, this will be taken into account to override the source COORDINATE_SYSTEM_NAME.

  • POSITIVE_LONGITUDE_DIRECTION=EAST/WEST. Value of MAP.override. Defaults to EAST. If specified, and USE_SRC_MAP is in effect, this will be taken into account to override the source POSITIVE_LONGITUDE_DIRECTION.

  • TARGET_NAME=string. Value of MAP.TARGET_NAME. This is normally deduced from the SRS datum name. If specified, and USE_SRC_MAP is in effect, this will be taken into account to override the source TARGET_NAME.

  • USE_SRC_LABEL=YES/NO. Whether to use source label in VICAR to VICAR conversions. Defaults to YES.

  • LABEL=string. Label to use, either as a JSON string or a filename containing one. If defined, takes precedence over USE_SRC_LABEL.

  • COMPRESS= NONE/BASIC/BASIC2. Compression method. Default to NONE. For maximum interoperability, do not use BASIC or BASIC2 which are not well specified and not always available in VICAR capable applications.

See Also