惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building a Marine Chart Parser in TypeScript: Parsing Bin...
Vladislav Popov · 2026-06-15 · via DEV Community

Vladislav Popov

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.

The Challenge

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.

What I Built

A monorepo of 7 TypeScript packages:

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

@s57-parser/s57 - 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 (rcnm * 100000 + rcid) to avoid collisions.

@s57-parser/s101 - 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.

@s57-parser/s52-render - 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.

@s57-parser/leaflet and @s57-parser/maplibre - Plugins for the two most popular web mapping libraries.

@s57-parser/cli - CLI tool to inspect and parse S-57/S-101 files from the terminal.

Numbers

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

Try It

Live demo (Boston Harbor, NOAA US5MA12M): https://devladpopov.github.io/s57-parser/

npm install @s57-parser/s57 @s57-parser/s52-render

Download free NOAA charts from charts.noaa.gov, drag-drop onto the demo viewer.

GitHub: https://github.com/devladpopov/s57-parser