vokkim / finnish-nautical-chart-vectors

Generate Finnish nautical charts in Mapbox vector tile format
14 stars 3 forks source link

Vectorized Finnish Nautical Charts - Merikartat

Generate Finnish nautical charts in Mapbox vector tile format or rasterize your custom PNG tiles.

Please read Github issue #17 for more information on problematic data and S-57 differences!

Scripts and chart style progress is very much stalled and the charts produced are missing relevant information!

Contains data from the National Land Survey of Finland Topographic Database 04/2020

Install dependencies

Get the data

Create PostGIS database merikartta

TODO: Use PostgreSQL in Docker?

With psql -U postgres:

CREATE DATABASE merikartta;
\c merikartta
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_raster;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION postgis_tiger_geocoder;

Fetch Väylä data (CSV)

Run import/fetch-csv-from-vayla.sh

Data set is quite big, nearly 1.5 GB.

Convert Väylä data into GeoJSON

Run node import/convert-csv-to-geojson.js

This should take some minutes.

Fetch Maanmittauslaitos data (GeoJSON)

Run import/fetch-geojson-from-mml.js

Calculate taululinja overlaps

Run import/calculate-taululinja-overlap.js

Prepare GeoJSON data for import

Run import/prepare-geojson-data.sh

This will take some time, especially the first step when generating syvyysalueet-dissolved-white.geojson file. Running the Mapshaper commands in parallel will speed up the process.

Import GeoJSON data into PostGIS

Run import/import-data-to-psql.js

Start the tile server

Build and watch preview client files using Parcel:

npm run watch

Open http://localhost:3000/

Generate vector MBTiles

TODO

Generate raster MBTiles

TODO

Generate client styles and assets

TODO

Development

Data documentation

Merikartta-aineistojen tietosisällön kuvaus

Vesiväyläaineistojen tietosisällön kuvaus

Maanmittauslaitoksen maastotietokohteet

Maanmittauslaitoksen maastokartta-aineiston koodit

Map styles

License

MIT

Please note that the nautical and topographical data sources are not part of this repository and have their own licenses.