arrowHome
arrowProject Page
arrowDownload
arrowBSB file format
arrowExamples
arrowContact us

libbsb is a portable C library for reading and writing BSB format image files. Typically used for nautical charts, BSB charts use the .KAP or .CAP extension and store cartographic information in addition to a run-length encoded raster image. libbsb is capable of recovering truncated or otherwise corrupted .KAP files. The library is released under the terms of the LGPL.

A number of utilities to convert and work with BSB charts are included in the libbsb package. Sample files and instructions on using these tools are available on the Examples page.

  • bsb2tif - convert BSB image to TIFF format
  • bsb2ppm - convert BSB image to PPM format
  • bsb2png - convert BSB image to PNG format
  • tif2bsb - convert TIFF image to BSB image
  • ppm2bsb - convert PPM image to BSB image
  • bsbfix - fix the index table in a BSB file

The source code for the libbsb library and utility programs can be downloaded or browsed online directly from the CVS repository.

The BSB file format stores raster image data in a run-length encoded binary form along with ASCII text describing the projection, datum and other information necessary for GIS applications. Used initially for nautical charts and marine charts by NOAA and the Canadian Hydrographic Service, it is increasingly being used for GIS raster maps in general.

The libbsb library and the BSB file format description were written due to the lack of information and utilities supporting this format. At the time libbsb was first written, November 2000, the only GNU/Linux software library the author could find which could read BSB files was Hugo. However, the code for reading BSB files was distributed as a binary-only module and limited to the i386 platform.

If you have a query or wish to contribute to libbsb please get in touch.

SourceForge.net Logo Valid HTML 4.01!