SOSI shape-up

I have written an open-source program to convert Norwegian SOSI map data files into the more widely used Shapefile format.

Downloads and documentation can be found on sosicon.espenandersen.no. The program is written in C++, source code is available on GitHub.

The SOSI format

Not long ago, the Norwegian Mapping Authority released Norwegian map data. Now, the Norwegian Polar Institute even released their maps over Arctic and Antarctic areas. However, some of these data files are in an unfamiliar format for most people.

The SOSI file format is used only by Norwegian government bodies. SOSI is an acronym for «Samordnet Opplegg for Stedfestet Informasjon» which translates into someting like «Coordinated Approach for Geospatial Information».

SOSI is just plain text. Syntactically the format resembles YAML, which is simple enough. However, semantically it’s another story! The file specification is very extensive. There are several variations of the same data types, and some field names may vary with different SOSI versions.

Sosicon

SOSI is built for carrying any type of information — not just coordinates and venue descriptions — which is good and bad at the same time. Obviously, it’s good because of its versatility. It’s bad becaus writing a generic parser is hard.

My parser, Sosicon, is not generic. It recognizes a subset of SOSI elements and converts them to shapefile elments if applicable. Text attribute data are converted to properties for their respective shapefile geometry.

The program runs on OS X, Linux and Windows.

9 thoughts on “SOSI shape-up”

  1. Veldig bra, tester dette nå på Linux Mint 17.1 Mate! Er du på Twitter eller Facebook? Jeg er @Ellevatory på Twitter.

    1. Da må du nok over på annen programvare. Sosicon kan bare konvertere fra SOSI til andre formater, ikke motsatt vei.

  2. Hi Espen!
    I am an architect working on a competition in Norway. I’m trying to figure out how to open .sos file in Autocad, Revit or Sketchup.
    Can you by any chance point me the right direction where to look for an answer to my problem?
    /Peter

    1. I don’t know if this is the most viable path to what you are trying to accomplish, but for 2D geometries I would start by converting the SOSI file, for instance by using my online Sosicon converter to create a set of shapefiles.

      The open source application QGIS is capable of opening shapefiles directly as a vector layer. The geometries can then be exported to DFX, which in turn can be imported to most CAD applications.

      1. Hi, tried to open a small .sosi file thats been converted with your online tool, but it seems heights are noe converted when I open the .shp files in Qgis (v 3.18.3)

        Tore

        1. Yes, unfortunately that’s right. As of now, Sosicon handles only two-dimensional objects. I’ll probably look into it some day, but for now, heights are not included in the shapefile.

Leave a Reply to Peter Cancel reply

Your email address will not be published. Required fields are marked *