On 2015-12-22 2:38 AM, Havard Tveite wrote:
> S57 is supported in Mapserver through OGR:
> http://mapserver.org/input/vector/S57.html >
> I guess it should be possible to implement S52 using
> Mapserver's quite powerful symbol mechanisms. But I don't
> know if has been done before.
Yes, that's been done, I'm actually aware of at least two groups who did
it, and I'm sure there must be several others.
Since the S52 symbology is a standard, it would make sense to open
source those mapfiles to improve on them collaboratively, but
unfortunately none of the groups that I am aware of were able to open
source their configs so far.
A few hints:
- Convert the S57 data to shapefiles or postgis to make your life easier
- Most symbology can be handled directly in mapfiles, except complex
symbols such as light houses that require some pre-processing to
generate new shapes for MapServer to render (showing the radius/range of
the light house)
- Check out OpenCPN if you need some inspiration, especially
https://github.com/OpenCPN/OpenCPN/tree/master/data/s57data - If you want to overlay multiple layers of S57 data in the same map,
then you may need this MapServer 7.0 enhancement:
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.
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