Name

IHO S-57 Files

Synopsis

  • Also known as S57. The IHO S-57 format is a vector interchange format used for maritime charts.

  • Developed by the International Hydrographic Organization (IHO). For more information about the IHO see http://www.iho.shom.fr/.

File listing

Individual S57 data files have an extension of *.000; for example, US1BS02M.000.

Data access/connection method

  • S57 access in MapServer occurs through OGR; CONNECTIONTYPE OGR must be used.

  • Specify a full path or a relative path from the SHAPEPATH to the .000 file for the CONNECTION.

  • The CONNECTION must also include a layer number (as per the layer number from ogrinfo, but minus one).

Special notes

The underlying OGR code requires two files from your GDAL/OGR installation when reading S57 data in MapServer: s57objectclasses.csv and s57attributes.csv. These files can be found in the /GDAL/data/ folder. If you receive an error in MapServer such as:

    msDrawMap(): Image handling error. Failed to draw layer named 's57'. msOGRFileOpen():
    OGR error. GetLayer( 9) failed for OGR connection

you may have to point MapServer to these files using the CONFIG parameter in the main section of your map file:

    CONFIG GDAL_DATA "C:\gdal\data"

ogrinfo examples

Here's an example that uses ogrinfo on an S57 file to get the OGR index number:

    > ogrinfo us1bs02m.000 ERROR 4: S57 Driver doesn't support update. Had to open data source read-only. INFO: Open of 'us1bs02m.000' using driver 'IHO S-57 (ENC)' successful. 1: ADMARE (Polygon) 2: CBLSUB (Line String) 3: CTNARE ...

Get Web Mapping Illustrated now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.