Skip to content

Instantly share code, notes, and snippets.

@quantenschaum
Created June 8, 2023 14:29
Show Gist options
  • Save quantenschaum/69f41ffd3e8f8c8151a6350430738887 to your computer and use it in GitHub Desktop.
Save quantenschaum/69f41ffd3e8f8c8151a6350430738887 to your computer and use it in GitHub Desktop.

S57 END conversion

How to convert an electronic navigational chart to map tiles and how to use them to update OSM data.

I will describe the procdure I used to update the buoys in the Waddenzee. The necessary commands are stored in the makefile, which is in the ZIP with all other resources.

  1. download ENC from https://www.vaarweginformatie.nl/frp/main/#/page/infra_enc
  2. extract the ZIP make unzip
  3. convert the ENC to shape files with ogr2ogr make waddenzee
  4. open them in QGIS using waddenzee.qgs
  5. export map tiles
  • processing, toolbox, raster tools, generate XYZ tiles (dir)
  • extent: from layer SOUNDG
  • min zoom: 10
  • max zoom: 16
  • metatile size: 16
  • set output dir and output html
  • run - this takes a while ☕

Then you can open the HTML file and view the tiles in your browser using leaflet.

I edit OSM data with JOSM. You can add the generated map tiles to JOSM as imagery layer.

  • imagery, imagery preferences
  • add TMS with tms:file:///path/to/qgis/tiles/{zoom}/{x}/{y}.png
  • the activate the layer from imagery menu

JOSM is pretty easy to use, how it works is explained in the Wiki. For editing seamarks you may want to set a filter filtering on seamark and check hide (h), such that only seamarks are displayed to make it less confusing.

You may want to add the INT1 icons path to QGIS in the settings (settings, options, system, SVG path).

The ENC files can be viewed directly in OpenCPN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment