Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nautical-charts

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nautical-charts

A library for reading nautical chart files.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nautical-charts

A pure JavaScript library for reading nautical chart files. In particular, for reading BSB-formatted (.bsb and .kap) files.

Installation

$ npm install nautical-charts --save

API

This API is in considerable flux, subject to drastic change, and therefore has not been fully documented.

readChart(contents: Uint8Array): KapChart | undefined

Parses a chart from the contents of a buffer.

writeRasterSegment(rasterSegment: KapRasterRow[], palette: KapPalette, buffer: Buffer, bufferWidth: number): void

Writes the (run-length-encoded, or RLE format) raster segment of a chart to a buffer in bitmap (i.e. RGBA) format. This function is useful for converting the chart to a more accessable format (such as PNG, via pngjs).

Types

These types are in considerable flux, subject to drastic change, and therefore have not been fully documented.

interface KapChart

A parsed BSB chart.

readonly metadata?: KapMetadata;

Metadata related to the chart specifically parsed from the text segment.

readonly rasterSegment?: KapRasterRow[];

The rows that make up the raster segment of the chart.

readonly textSegment?: KapTextEntry[];

The partially-processed entries that make up the text segment.

License

The MIT License (see LICENSE.md)

FAQs

Package last updated on 12 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc