Show HN: Vector Charts – Add Nautical Charts to Your Web App

  • On a technical level, this is a perfect use-case for PostGIS, which I'm a huge fan of.

    Charts are hand-authored by government hydrography offices and encoded into a format called "S-57". These files contain spatial data for a small area, and different charts cover different zoom levels. This presents a few problems for web apps: Charts of different intended zoom levels cover other data, the full chart dataset is too large to stream, and charts aren't divided into xyz tiles cleanly.

    To solve this, I run a bespoke pipeline which processes all nautical chart data into an internal format using PostGIS. From there, I merge all chart data together, overlaying higher accuracy charts over the lower accuracy charts. The pipeline performs a lot of data validation & reconciliation to remove bad data, then simplifies & renders to vector tiles.

    PostGIS is critical to this - I started by using a bunch of python geometry manipulation libraries, and slowly shifted more and more of the processing into SQL queries as I realized how fast and intuitive it is.

  • If you just want to play around with the nautical chart rendering, check out https://app.vectorcharts.com/ - A free nautical chart viewer that demonstrates the vector charts API.