You are here

Navigation output using MB System and GDAL

Introduction

NewProgram updated on September 7, 2012. List of updates is given below.

MB-System Navigation Example Displayed in GoogleEarthThe mb_out_nav program is a simple interface between MB System and GDAL/OGR. The program is used to export multibeam navigation from MB System to a multi-segment vector file supported by GDAL/OGR. Each segment of the exported multibeam navigation is tagged with the following attributes:

  • multibeam filename
  • year
  • julian day
  • line length in seconds
  • line length in kilometres

When imported into a GIS the vector attributes can be queried and used to control vector display. For example:

  • to display all lines segments greater than 1.5 km in length
  • to display all lines segments from Julian Day 126

Vector Formats

The GDAL/OGR library allows output to a number of different vector formats. The formats currently supported by mb_out_nav include:

  • ESRI Shapefile
  • MapInfo TAB and MIF formats
  • GoogleEarth KML
  • Generic Mapping Tools (GMT)
  • Geography Markup Language (GML)
  • The geospatial data interchange format based on JavaScript Object Notation (GeoJSON)

The output format is automatically determined from the output file extension. For example output.kml will use the GDAL/OGR KML driver.

Re-Projection

The program uses the GDAL projection functions to re-project the exported data if required. It accepts projection arguments in any of the formats supported by GDAL. This includes EPSG, proj strings, and WKT. For more information on accepted projections formats, check the GDAL utilities pages.

Usage

The mb_out_nav can be run from the command line with the following arguments:

mb_out_nav -i mb_datalist -o output_vector -n navigation_channel -p projection_info -f -e

where

mb_datalist is the MB System compatible data list made up of multibeam filenames, and their associated format

output_vector is the name assigned to the output vector file. The file extension determines the output vector format.

navigation_channel [optional] is the navigation channel number to export.

projection_info [optional] is the GDAL supported string for re-projecting the navigation before saving. 

-f with use the fast navigation file (.fnv) if it is available [Note: this flag will override the -e flag].

-e will use navigation edit file (.nve) if it is available.

The individual multibeam filenames are printed to stderr as they are read.

Examples

The following examples provide various options for creating a navigation vector from a MB System data list entitled datalist.txt.

KML

mb_out_nav -i datalist.txt -o navigation.kml

ESRI Shapefile

mb_out_nav -i datalist.txt -o navigation.shp

MapInfo MIF Re-Projected to UTM Zone 8N

mb_out_nav -i datalist.txt -o navigation.tab -p EPSG:32608

Installation

Download the gzipped tar file download here.

Extract the tar file.

The mb_out_nav program is suppled with source code and a Makefile. No pre-compiled binaries are available at this time. The program requires the GDAL development files and the installed MB System.

To build the program edit the Makefile and set the prefix to the location of your installed MB System (e.g. /usr/local/mbsystem) and run make. Run make install (may need root privilege) to install the program in the MB System bin directory.

If nedCDF is not installed in a standard location you may have to set the directory in the in the Makefile. To set the netCDF location edit the Makefile and add the full path to the LIBS line with a "-L" flag (e.g. -L/usr/local/netcdf-4.1.3/lib).

ToDo

  • More testing and debugging.
  • Add support for reading MB navigation edit (.nve) files.
  • Add support for reading MB fast navigation (.fnv) files.
  • Add additional vector formats.
  • Add additional vector attributes such as start and stop times.
  • Add vector attributes for project and folder names.
  • Add support for exporting soundings (wkbPoint).
  • Probably lots more...

Updates

(Updated on September 7, 2012)

  • Added a new -e flag to read navigation edit file if is available. It it is not available, the program fall back to the original raw file.
  • Added a new -f flag to read fast navigation file if is available. It it is not available, the program fall back to the nav edit file (-e) or the original raw file.
  • Changed the name of the source directory (and tar filename) to match name of executable.
  • Minor code cleanup.

(Updated on July 4, 2012)

  • Added math lib (-lm) to LIBS in Makefile
  • Changed Filename attribute to Name for improved display in GoogleEarth (KML)

Thanks to Gordon Kieth for Bugfix and Comments.

Categories: