4

Currently working on a project that among other things requires displaying NOAA ENC for a web based intranet portal. We downloaded S-57 ENC data from NOAA site and successfully imported them into Postgres DB using "ogr2ogr". We now need to serve them up with the right colors and symbols that must follow S-52 standard.

I have looked at OpenCPN and ArcGIS-ArcMap and other desktop tools which have beautiful renditions of S-57 data with colors, daylight/ night and symbols. I would like to do the same for a web app that is served by GeoServer. The styling is hopefully accomplished using Styled Layer Descriptor (SLD) files.

I've looked at Atlas Styler, OpenGeo Styler etc. Nice tools but i'd hate to hand-craft them as there are a ton of layers and features, not to mention validating all of them to get it right. It would be nice if there is a way to download or import SLD files from good sources that correspond to S-57 layers. What is the least painful way to render ENC data on Web?

  • i've this problem too. here speaks about osgeo-org.1560.n6.nabble.com/… – user13031 Nov 22 '12 at 16:26
  • Could you set up an ArcGIS server WMS for the S-57 layers, then do a GetStyles request to get the SLD? – nmtoken Feb 19 '17 at 12:31
1

I cannot link to a ready-made SLD file for S-57 layers - which is what I suspect you are really after. However I have just been faced with a comparable issue (albeit for a very different schema), converting over five hundred portrayal rules/symbols detailed in a PDF document into SLD XML.
There is no 'silver bullet' that I found, however I am happy to share the overall procedure and any tips I found. Simply put - a combination of automated xml creation using a script and manual configurations (for complex symbols) is the way forward.

This is the approach recommended:

Create an excel table to capture symbology information. It is much easier entering information into Excel than directly into notepad++ xml. My table had 44 columns in total, and captured information including: feature codes, feature type, 4 line stylings (fill, width, dash), polygon fill, polygon fill image name, portrayal rules (including whether LT, GE, EQ etc.) text labelling and further notes.

Next write a (python) script which processes the table line by line and translates to SLD XML. In my case complex point symbols and pattern fills were extracted from the PDF and tidied up using GIMP into PNG. A rough estimate is that 80% of the full symbol set were captured using 'simple' symbology, and I see no reason why S-57 can be any different.

The remaining symbols are likely to be a tad more complex and will require a bit more in-depth SLD knowledge (vertical line tick makes for railways; tunnel entrances on polylines etc). In these cases try using an external editor to create the SLDs, save as XML and link to these files in the spreadsheet. I tried QGIS, however it quickly became apparent the geoserver SLD cookbook provided a better resource for manual XML creation. Pull in the external SLD XML files using the python script and insert into the master SLD in the right place. Have some test layers set up in Geoserver for rapid XML validation too.

It requires fairly indepth SLD and python knowledge, however now the system is set-up any changes to the symbology take moments and the script recreates the XML from scratch in seconds. So - painful at the start but nice and smooth for ensuing maintenance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.