OpenSeaMap implementation using Tegola
This repo houses instructions and configuration files to aid with standing up a tegola-based vector tile server that mimics the OpenSeaMap project. It builds on earlier work with OpenStreetMap data.
- seamark.json - an imposm3 mapping file for the OSM PBF file.
- seamark.toml - a tegola configuration file for the OSM import produced by imposm3.
- mapbox.json - a Mapbox GL JS Style sheet with seamark extensions
- PostgreSQL server with PostGIS enabled.
- imposm3 (download binaries for linux or see the Go Go Go section for a homebrew-ish OS X installation)
- tegola (download)
- gdal - required for Natural Earth import
imposm3 import -connection postgis://user:password@host:port/osm_seamark -mapping seamark.json -read path/to/your-planet.osm.pbf -write
imposm3 import -connection postgis://user:password@host:port/osm_seamark -mapping seamark.json -deployproduction
-
Seamarks
-
vectortiles-generator from OpenSeaMap project
National Charting Information
- US Chart No 1: https://nauticalcharts.noaa.gov/publications/us-chart-1.html
- UK Chart No 1: http://www.marinedocs.co.uk/wp-content/uploads/2014/10/Chart-5011-Symbols-and-Abbreviations-used-on-Admiralty-paper-Charts.pdf
- Quick guide to ENC Symbols (augments Chart 1 I believe): https://www.admiralty.co.uk/news/blogs/the-quick-guide-to-enc-symbols
It can be desirable to use separate databases for a tegola installation. For example, even though you may have OpenStreetMap data for multiple metro or Geofabrik extracts, you'll likely only need one copy of the OSM land polygons and Natural Earth Data.
Starting with tegola v0.6.0
, environment variables can be used to configure database connection information. Copy .env-example
to .env
and customize away. A Procfile
is included for those who use tools that recognize it, such as foreman, clones such as node-foreman or Python's honcho, or the Heroku Command Line Interface which bundles it.
For example, for non-production use, you should be able to:
npm install foreman -g
nf start
Of course, you may use your preferred way of including environment variables from a file.