Blue

Bathymetry of the Loch Torridon Narrows.
GDAL
QGIS
Published

October 4, 2022

Bathymetry of the Loch Torridon Narrows

Once I’d discovered the UKHO site with lots of detailed bathymetry for the UK, it seemed obvious to produce a map of Loch Torridon. In the end, it worked best to concentrate on one part of the Loch.

Bathymetry of the Loch Torridon Narrows.

Bathymetry of the Loch Torridon Narrows.

Data I used

Tools I used

  • GDAL to convert .bag files to tif and combine different resolutions into one output.
  • QGIS to fill some of gaps in data (r.fill.null), e.g. fish farm to east of Shieldaig Peninsula.
  • QGIS to layout.

What did I learn?

  • Where to find detailed bathymetry data for UK.
  • How to extract bathymetry data from .bag files.
  • How shallow the narrows themselves are, and how quickly they drop away into the outer loch.

What do I want to do next?

  • Data from 8m bathymetry doesn’t look great with more detailed areas, but I haven’t found a way round this yet.

Process

Converting bag files

Files are provided as .bag - Bathymetry Attributed Grid. If add straight to QGIS nothing shows. There are two bands of data.

Appear to need libhdf5.

BAG files have two image bands

  • Band 1 = Elevation
  • Band 2 = Uncertainty

Can select a single band as follows:

gdal_translate -b 1 input.tif output.tif

So to export the elevation band:

gdal_translate -b 1 -of GTiff input.bag output.tif

Combining different resolution bathymetry layers

Combined the bathymetry layers with GDAL. Used gdalbuildvrt.

gdalbuildvrt combined.vrt bathy8.tif bathy4.tif bathy2.tif -resolution highest

Then converted to tif format.

gdal_translate -of GTiff combined.vrt combined.tif

Filling in gaps

For example, can I fill the bit near the fish farm to the east of Shieldaig Peninsula?

In QGIS:

  • r.fill.null seemed to work, but play with the settings.

Defaults seemed fine.

Setting up output

Loaded into QGIS. Duplicated layer to add hillshade.

Used following layers from OS Open Zoomstack:

  • surfacewater
  • waterlines
  • foreshore
  • names
  • contours
  • land

and styled with OS qml style sheet.

Back to top