(no title)
chrisdalke | 9 months ago
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.
No comments yet.