The sources of information for the coastal regions are not limited to classical terrestrial sources. The marine charts can provide information very helpful and they allow creating rich and impactful documents.
The most adapted sources to quickly integrate a great deal of information are the marine electronic charts (ENC). In a single data set you find all information contained in a chart: coastline, bathymetry, navigation aids, etc…
Unlike the USA and other countries where the charts are free and available to download, in France one has to pay in order to gain access to them, which slows very much their dissemination and use.
If you are an ArcGis user, you count with an extension developed by NOAA to integrate ENC data in ArcMap. For QGis, there is not such extension.
ENC charts are distributed in a special format according to the International Hydrological Office (IHB) called S-57. Among the vector formats loadable directly to QGis, you have this optional format. Therefore you can open an ENC chart in QGis, and view its contents. But the problem is that you display its contents with default classical symbols that have no connection with symbology used on a nautical chart.
Here is the result of loading an S-57 file into QGis.
You can, undoubtedly, go over all the layers, assigning the adequate symbology to every layer. But just remember that there are about 75 layers in a classic ENC .
We propose a faster way.
We have uploaded a video on YouTube that you can watch right here
If you want to test this procedure and you do not have an ENC chart at hand, you can download for free an American chart, from the NOAA website, in clicking here .
Principle of the procedure
Instead of using the direct loading of the S57 file, we will make a previous treatment to create shapefiles of the different layers present. It is essential to display a pre-set, moreover, this allows to integrate only the layers you want to the other usual processing.
If you have not already performed this task, you have to install FWTools. FWTools is an open source tool kit for Windows (Win32) and Linux (x86 32bit). It is a very simple kit without source code or compilation.
The installation with Windows is very simple:
* We download the package. We double click and the installation starts.
* It will create a directory including a file called openev.bat. It is this directory that will launch the OpenEV software that manages other components.
FWTools contains among his tools, GDAL-OGR: a library and a command line utility to read and write raster formats (gdal) and vector (ogr).
Once installed the FWTools, you can start by using the menu All Programs-> FWTools -> FWTools Shell.
A Command window opens.
We are going to translate the S57 format into a series of files shp that we will record in a new directory.
The command line to return has the following form:
ogr2ogr – skipfailures output input
output: is the name of an empty directory where the input created files shp will be stored :this is the S-57 file to translate , with its extension .000
ogr2ogr – skipfailures d: \ ENC570940 D: \ shom \ ENC_25000 \ FR570940.000
Do you do not worry about the endless list of errors and warnings that appear during the execution. We have not yet found someone who can explain these warnings, but what you must keep in mind is that the result of the translation is good.
If you now look the directory contents, you will find that the shapes have, correctly, been created.
Therefore, you have 75 shape files , but still no symbology for QGis.
Resources for QGis symbology
You must download a zip file containing:
– a large number of symbols svg that we have gathered into a directory “nautical”. You can find all these symbols by searching on the internet but the discovery will be without previous warning.
– a QGis Project (version 2.6) with the assignment of each symbol for each layer shape.
To download the file, click here .
The “nautical” directory must be copy in the repertoire svg from your QGis setup.
For example : C: \ Program Files \ QGIS Brighton \ apps \ qgis \ svg \ ( if you have an x64 system )
Update of 09/13/2016: You no longer need installing the symbols directory if you use the Resource Sharing plugin. The symbols indicated right here are available through this plugin. (See Article Share your resources ( symbols, images, scripts ) for Qgis with a new plugin)
Display the ENC chart in QGis with an adequate symbology
Lastly, you have to copy the downloaded QGis project file, s567.qgs, in the directory with the shapes created in the previous step, and loading the project in QGis.
Then, you will see the data with a marine chart symbology.
If you do not get that kind of result, it’s simply because your installation QGis is not in the same directory as the one registered in the project (C: / Program Files / Brighton QGIS / apps / qgis )
Evaluate which is the correct path, then open the s57.qgs file in a text editor and change all the occurrences of:
v = C: / Program Files / Brighton QGIS / apps / qgis / svg / nautical
by the correct path for your installation.
Thank you, this is exactly what I was looking for!
Thank you for this. This is really great. I have it mostly working, but seem to be having troublegetting the .qgs file to point to svg directory on MacOSX. I have tried /Applications/QGIS-LTR.app/Contents/Resources/svg/nautical/ and variations on ../../Applications/QGIS-LTR.app/Contents/Resources/svg/nautical/ but so far, no luck. Any ideas??
Sorry, MacOSX is a big unknown in my universe
Ha! Ok, fair enough. That said, I have made some progress, but there are 6 or 7 of layers that are returning as ‘Unavailable’ when loading into Qgis. Also, there are no soundings layers in the .qgs file. Any thoughts on these issues?
Thanks again for a great help!
At first sight (perhaps later I would have other “revelations”) it seems to me that the soundg.shp shape produced by FWtools is not part of the qgis project S57.qgs. I had made a selection and not an exhaustive project with all the layers of the S57 file
On the other hand, if my memory serves me correctly, sounds do not have a specific symbol. It’s just a tag with the value, except when it’s above the 0 of the tides.
The only solution is to add your own symbology to the soundg layer, which is no small feat.…
For unavailable layers, your S57 file may not contain data for those layers. The format is exhaustive but the actual content depends on the area and the data specific to it
Thank you for the method.
Has anyone managed to bring the SOUNDG layer in and successfully display depths please? I have brought the layer in but the VALSOU attribute doesn’t seem to be present which should be holding the depth info?
If you are looking for the value of the probes in soundg.shp, you will not find them. Simply because they are contained in the geometries as z. The soundg points are xyz points.
But in addition, the shp soundgh is multipoint type.
You must, first pass from multipoint to point, with the saga processing “convert multipoint to point”, then calculate a new field “z” in this new layer with the formula z($geometry)/10
Be careful not to forget the/10 because the S57 probes are… in decimeters (everything to make it simple!)
From there, you create the labels according to your wishes
I have just seen you new article of how to produce the soundg z layer so you have saved me asking the question.
I’m afraid on this I am a cartographer and not a coder!
Thank you for your help
Thank you for your explanation..
Can I ask a question??
I want to export shape file(.SHP) to S-57 (.000)
Is it possible in qgis??
This is possible simply by exporting the layer and selecting the format type S57 base file
But the preparation of the layers is very complicated and it is not documented.
The answer is YES but I would advise against doing so
Thanks, this is relevant to our project as well: https://github.com/faunalia/qnavigate/blob/master/README.md
Have you updated the files to QGIS 3.x?
Great blog – exactly the information I was after, thank you for sharing!