<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vladislav Popov</title>
    <description>The latest articles on DEV Community by Vladislav Popov (@devladpopov).</description>
    <link>https://dev.to/devladpopov</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3983922%2F557d1681-43a2-4b2e-9f96-7d6595ceab29.jpg</url>
      <title>DEV Community: Vladislav Popov</title>
      <link>https://dev.to/devladpopov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devladpopov"/>
    <language>en</language>
    <item>
      <title>Building a Marine Chart Parser in TypeScript: Parsing Binary Formats, Topology, and IHO Symbology</title>
      <dc:creator>Vladislav Popov</dc:creator>
      <pubDate>Mon, 15 Jun 2026 09:28:02 +0000</pubDate>
      <link>https://dev.to/devladpopov/building-a-marine-chart-parser-in-typescript-parsing-binary-formats-topology-and-iho-symbology-372n</link>
      <guid>https://dev.to/devladpopov/building-a-marine-chart-parser-in-typescript-parsing-binary-formats-topology-and-iho-symbology-372n</guid>
      <description>&lt;p&gt;Every commercial vessel on the planet uses electronic navigation charts (ENC) in S-57 format. Despite this, there has never been a working JavaScript parser for these charts. I set out to change that.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Challenge
&lt;/h3&gt;

&lt;p&gt;S-57 files use ISO 8211, a binary format from 1994. The data is stored as variable-length records with mixed binary and text fields. Coordinates are integers scaled by a multiplication factor (typically 10 million). Geometry uses chain-node topology where polygons are assembled from shared edges.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Built
&lt;/h3&gt;

&lt;p&gt;A monorepo of 7 TypeScript packages:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;@s57-parser/iso8211&lt;/code&gt;&lt;/strong&gt; - Pure ISO 8211 binary parser. The hardest bug: two binary field notations (&lt;code&gt;b15&lt;/code&gt; = suffix meaning signedness+bytes, &lt;code&gt;B(40)&lt;/code&gt; = parenthesized meaning bits) that look almost identical but parse completely differently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;@s57-parser/s57&lt;/code&gt;&lt;/strong&gt; - S-57 data model. Resolves chain-node topology: each Edge references start/end ConnectedNodes via VRPT records. Different spatial record types can share the same RCID, so I use compound keys (&lt;code&gt;rcnm * 100000 + rcid&lt;/code&gt;) to avoid collisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;@s57-parser/s101&lt;/code&gt;&lt;/strong&gt; - Parser for the next-generation S-101 format (mandatory from 2029). Fun fact: S-101 uses ISO 8211, not GML/XML as many assume. My ISO 8211 parser handles both formats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;@s57-parser/s52-render&lt;/code&gt;&lt;/strong&gt; - Canvas2D renderer implementing IHO S-52 symbology: 3 color palettes (Day/Dusk/Night), conditional depth coloring, sector light arcs, pattern fills, text labels with light characteristic abbreviations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;@s57-parser/leaflet&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;@s57-parser/maplibre&lt;/code&gt;&lt;/strong&gt; - Plugins for the two most popular web mapping libraries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;@s57-parser/cli&lt;/code&gt;&lt;/strong&gt; - CLI tool to inspect and parse S-57/S-101 files from the terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Numbers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;~5100 lines of TypeScript&lt;/li&gt;
&lt;li&gt;127 tests across 8 test files&lt;/li&gt;
&lt;li&gt;0 runtime dependencies (core packages)&lt;/li&gt;
&lt;li&gt;Parses a typical NOAA harbor chart (2320 features) in ~800ms in the browser&lt;/li&gt;
&lt;li&gt;160+ S-101 feature types in the catalogue&lt;/li&gt;
&lt;li&gt;MIT license&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Try It
&lt;/h3&gt;

&lt;p&gt;Live demo (Boston Harbor, NOAA US5MA12M): &lt;a href="https://devladpopov.github.io/s57-parser/" rel="noopener noreferrer"&gt;https://devladpopov.github.io/s57-parser/&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @s57-parser/s57 @s57-parser/s52-render
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Download free NOAA charts from charts.noaa.gov, drag-drop onto the demo viewer.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/devladpopov/s57-parser" rel="noopener noreferrer"&gt;https://github.com/devladpopov/s57-parser&lt;/a&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>opensource</category>
      <category>gis</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
