Skip to content

Generate Finnish nautical charts in Mapbox vector tile format

Notifications You must be signed in to change notification settings

vokkim/finnish-nautical-chart-vectors

Repository files navigation

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!

Lähde: Liikennevirasto. Ei navigointikäyttöön. Ei täytä virallisen merikartan vaatimuksia.
Contains information received from the Finnish Transport Agency’s nautical chart database 04/2020
Contains data from the National Land Survey of Finland Topographic Database 04/2020

Install dependencies

  • Install Docker
  • Install PostGIS
  • Install NodeJS 10.x (mapbox-gl-native does not exist for newer nodejs versions: mapbox/mapbox-gl-native#16485)
  • Run npm install

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

  • Edit Mapbox style json: TODO
  • Edit fonts / glyphs: TODO
  • Edit SVG-sprites: TODO
  • Edit OpenLayers conversion

License

MIT

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

About

Generate Finnish nautical charts in Mapbox vector tile format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published