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;
CONNECTIONTYPEOGRmust be used.Specify a full path or a relative path from the
SHAPEPATHto the .000 file for theCONNECTION.The
CONNECTIONmust also include a layer number (as per the layer number fromogrinfo, 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 connectionyou 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 ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access