Skip to content

manimaul/s57tiler

Repository files navigation

S57 Chart to GeoJson & Mapbox Vector Tile (MVT) Renderer

NOTE: This project is a proof of concept and will not be developed futher. However, it is being developed using a different tech stack. Please see https://openenc.com/enc .

The goal of this project is to render geojson and json meta data from S57 nautical chart files suitable for input to tippecanoe which transforms the data into MVT / MBTiles.

We will then serve the data with tileserver-gl and work on styling the chart with maputnik.

Example

# Process and convert s57 ENC data locally or in a docker container  
cargo run -- mbtiles -i $(pwd)/data/charts/US5WA22M/US5WA22M.000 -o $(pwd)/data -n LNDARE,DEPARE,SEAARE,SLCONS,PONTON,HULKES,SOUNDG,BOYSPP
cargo run -- config -o $(pwd)/data -s localhost:8080,127.0.0.1:8080
cargo run -- style -o $(pwd)/data/styles -s 127.0.0.1:8080
# OR
docker build -t s57t .
docker run --rm -v $(pwd)/data:/data s57t s57tiler mbtiles -i /data/charts/US5WA22M/US5WA22M.000 -o /data -n LNDARE,DEPARE,SEAARE,SLCONS,PONTON,HULKES,SOUNDG,BOYSPP
docker run --rm -v $(pwd)/data:/data s57t s57tiler config -s localhost:8080,127.0.0.1:8080 -o /data
docker run --rm -v $(pwd)/data/styles:/styles s57t s57tiler style -s 127.0.0.1:8080 -o /styles

# Serve up the rendered marine chart / map
docker run --rm -v $(pwd)/data:/data -p 8080:8080 maptiler/tileserver-gl

# Optionally fire up maputnik to work on styling
docker run -it --rm -p 8888:8888 maputnik/editor

Screenshots

US5WA22M rendered with tileserver-gl

You can find a live demo here: https://s57dev.mxmariner.com/styles/day_bright_style/#14/47.27888/-122.41757

Un-styled Styled (WIP)
Screenshot Screenshot

Dev Setup

In order to run this locally you'll need system gdal installed as well as tippecanoe. And of course since this is rust you'll need to follow the rustup guide.

MacOS

brew install gdal tippecanoe

Linux

apt install -y libgdal-dev
git clone https://github.com/mapbox/tippecanoe.git && \
    cd tippecanoe && \
    make
sudo cp /tippecanoe/tippecanoe /usr/local/bin/tippecanoe
sudo cp /tippecanoe/tile-join /usr/local/bin/tile-join
sudo cp /tippecanoe/tippecanoe-decode /usr/local/bin/tippecanoe-decode
sudo cp /tippecanoe/tippecanoe-enumerate /usr/local/bin/tippecanoe-enumerate
sudo cp /tippecanoe/tippecanoe-json-tool /usr/local/bin/tippecanoe-json-tool

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published