[mapserver-users] S57 Marine Charts on mapserver?
Lars Schylberg
lars.schylberg at blixtmail.se
Wed Dec 23 02:39:46 PST 2015
I can just agree what Daniel said. It can be done and I even know about
three groups that have done it. I am in one of those groups and have
worked on nautical S52 presentation done with Mapserver configurations
for a little more than one year. My experience is that it can be done
as good or even better than the big commercial GIS vendors. Our goal
has not been to produce a nautical map for navigation. It has been done
for planning purposes and as a base map. I am still working on this
project and I will see next year what parts we could release as open.
At least I think that we could contribute to the Mapserver documentation
around these issues.
Back to the S52 symbology standard. The standard describes point
symbols, line symbology and area patterns in a file that has the
extension: “.dai”. It uses the pen plotter style of description, ie
pen up, pen down, move to, to describe around 150 – 200 different
symbols, lines types and patterns. The syntax in the .dai file is the
old graphic standard HPGL. It is of course very precise but You have
to interpret it and turn it into something useful for the mapfile syntax.
There are different ways to do this. The opencpn project and some
others have used the code in opencpn and made bitmaps of the symbols
that easily could be used in mapserver.
Others have converted the .dai files to svg. This is the way IHO seems
to be going also with the upcoming new S102 standardization. They will
replace .dai files with svg files and other xml constructions to
describe lines and patterns. There is currently a limitation in
mapserver to go this way, that I have mentioned in mapserver-dev
questions earlier this year.
http://osgeo-org.1560.x6.nabble.com/svg-symbols-setting-color-outline-width-outline-color-td5231065.html
This is of course if You want to implement all different color modes.
The approach we have used, is a mix of true type symbols and native
mapserver symbology. Actually I prefer the native mapserver symbology.
This is more or less the same as HPGL line to xy, line to xy and -99 for
pen up. So I have made some of the point and line symbols into native
mapserver symbology symbols. These have been edited by hand based on
the stroke descriptions in the dai or svg files. Then You could set
color and width in the mapfile.
I did write a little about s57 data handling in a mapserver-users entry
back in September
https://lists.osgeo.org/pipermail/mapserver-users/2015-September/078251.html
One group that has shown how to convert S57 to postgis and display it
with mapserver for one single chart is this Russian group:
https://github.com/nextgis/navi2pg
You can find a lot inspiration how the mapfiles are written. They have
used bitmap symbols.
Even if I don’t speak or read Russian, I think You could grasp most of
it anyway. Google translate can also help for specific words.
Personally I would prefer to have an end state with a spatialite
database (or geopackage with symbology included) for the S57 databases
but right now I am using shapefiles.
Good luck
Lars Schylberg
More information about the MapServer-users
mailing list