# OGDI -- OGDI Bridge

Note : From GDAL >= 1.5.0, there should be little reason to use the OGDI raster bridge, as ADRG, DTED and RPF (CADRG/CIB) formats are natively supported by GDAL.
OGDI raster data sources are supported by GDAL for reading. Both Matrix and Image families should be fully supported, as well as reading of colormap and projection metadata. The GDAL reader is intended to be used with OGDI 3.1 drivers, but OGDI 3.0 drivers should also work.

OGDI datasets are opened within GDAL by selecting the GLTP URL. For instance, gltp://gdal.velocet.ca/adrg/usr4/mpp1/adrg/TPSUS0101 would open the ADRG dataset stored at /usr4/mpp1/adrg/TPSUS0101 on the machine gdal.velocet.ca (assuming it has an OGDI server running) using the 'adrg' driver. This default access to a whole datastore will attempt to represent all layers (and all supported family types) as bands all at the resolution and region reported by the datastore when initially accessed.

It is also possible to select a particular layer and access family from an OGDI datastore by indicating the layer name family in the name. The GDAL dataset name gltp:/adrg/usr4/mpp1/adrg/TPUS0101:"TPUS0102.IMG":Matrix would select the layer named TPUS0102.IMG from the dataset /usr4/mpp1/adrg/TPUS0101 on the local system using the ADRG driver, and access the Matrix family. When a specific layer is accessed in this manner GDAL will attempt to determine the region and resolution from the OGDI 3.1 capabilities document. Note that OGDI 3.0 datastores must have the layer and family specified in the dataset name since they cannot be determined automatically.

    eg.
      gltp://gdal.velocet.ca/adrg/usr4/mpp1/adrg/TPUS0101
      gltp:/adrg/usr4/mpp1/adrg/TPUS0101
      gltp:/adrg/usr4/mpp1/adrg/TPUS0101:"TPUS0102.IMG":Matrix

OGDI Matrix family layers (pseudocolored integer layers) are represented as a single band of raster data with a color table. Though the Matrix layers contain 32bit integer values, they are represented through GDAL as eight layers. All values over 255 are truncated to 255, and only 256 colormap entries are captured. While this works well for most Matrix layers, it is anticipated that at some point in the future Matrix layers with a larger dynamic range will be represented as other data types.

OGDI Image family layers may internally have a type of RGB (1) which is represented as three 8bit bands in GDAL, or Byte (2), UInt16 (3), Int16 (4) or Int32 (5). There is no support for floating points bands in OGDI 3.1.

The GDAL OGDI driver will represent OGDI datasources as having arbitrary overviews. Any GDAL raster read requests at a reduced resolution will be passed on to the OGDI driver at that reduced resolution; potentially allowing efficient reading of overview information from OGDI datastores.

If an OGDI datastore is opened without selecting a layer name in the dataset name, and if the datastore has OGDI 3.1 style capabilities, the list of layers will be made available as SUBDATASETS metadata. For instance, the gdalinfo command might report the following. This information can be used to establish available layers for direct access.

    Subdatasets:
      SUBDATASET_1_NAME=gltp:/adrg/usr4/mpp1/adrg/TPUS0101:"TPUS0101.IMG":Matrix
      SUBDATASET_1_DESC=TPUS0101.IMG as Matrix
      SUBDATASET_2_NAME=gltp:/adrg/usr4/mpp1/adrg/TPUS0101:"TPUS0102.IMG":Matrix
      SUBDATASET_2_DESC=TPUS0102.IMG as Matrix
      SUBDATASET_3_NAME=gltp:/adrg/usr4/mpp1/adrg/TPUS0101:"TPUS0101.IMG":Image
      SUBDATASET_3_DESC=TPUS0101.IMG as Image
      SUBDATASET_4_NAME=gltp:/adrg/usr4/mpp1/adrg/TPUS0101:"TPUS0102.IMG":Image
      SUBDATASET_4_DESC=TPUS0102.IMG as Image

See Also:

- ogdi.sourceforge.net