.. _raster.s111:

================================================================================
S111 -- S-111 Surface Currents Product
================================================================================

.. shortname:: S111

.. build_dependencies:: libhdf5

.. versionadded:: 3.9

This driver provides read-only support for surface currents in the S-111 format,
which is a specific product profile in an HDF5 file.

S-111 files have two image bands representing the following values for each
cell in a raster grid area:

- surface current speed (band 1), in knots
- surface current direction (band 2), in degree measured from true north
  clock-wise.

When opening a S-111 file, no raster band is directly available. But a list of
subdatasets will be reported, one for each timestamp available in the file.

An actual dataset can be opened through such a subdataset, with a syntax like
``S111:"{filename.h5}":Group_001``.

Georeferencing is reported.

Note that the driver currently only supports regularly gridded S111 datasets.

Since GDAL 3.12, multiple feature instance groups per dataset (to encode grids
using different vertical datums) are supported. In that case, each feature
instance group and timestamp group is exposed as a GDAL subdataset, whose name
is of the form ``S111:"{filename.h5}":SurfaceCurrent.{XX}:Group_{YYY}``.

Driver capabilities
-------------------

.. supports_georeferencing::

.. supports_virtualio::

Open options
------------

|about-open-options|
The following open options are supported:

- .. oo:: NORTH_UP
     :choices: YES, NO
     :default: YES

     Whether the top line of the dataset should be the northern-most one.

     This is the default behavior of most GDAL formats, but the native
     organization of the data in S-111 products is to have the first line of
     the grid being the southern-most one. This native organization can be
     exposed by the driver by setting this option to NO (in which case the
     6th term of the geotransform matrix will be positive)

See Also
--------

-  Implemented as :source_file:`frmts/hdf5/s111dataset.cpp`.
-  `S-111 Bathymetric Surface Product Specification <https://registry.iho.int/productspec/view.do?idx=178&product_ID=S-111&statusS=5&domainS=20&category=product_ID&searchValue=S-111>`__
-  :ref:`BAG driver <raster.bag>`
-  :ref:`S-102 driver <raster.s102>`
-  :ref:`S-104 driver <raster.s104>`
