Denne posten er også tilgjengelig på norsk.
Update: A new tool by Espen Andersen, sosicon, now makes it very easy to convert SOSI files to ESRI Shape format. If it is not necessary to access SOSI files directly in QGIS (or you’re not using QGIS at all) I recommend you try sosicon first. Windows, Linux and Mac OS X versions are available at Andersen’s github.
The datasets I am interested in are mostly from the Norwegian Mapping Authority, which means that being able to work with the Norwegian SOSI format is quite useful. Both of the GIS packages rely on GDAL and OGR for accessing raster and vector data, but to get SOSI support, you will have to remove the standard GDAL library and compile the library yourself, with SOSI enabled.
These are the steps I took to get SOSI support:
- Uninstall the gdal-bin package
- Follow the instructions at trac.osgeo.org/gdal/wiki/SOSI:
- Install the dependencies, unless they are already installed
- Download and build the Mapping Authority’s FYBA library
- Download and build GDAL with SOSI enabled (building took close to an hour on my really slow computer)
- I had to update the library cache (on Ubuntu 13.10)
- Somewhere along the path QGIS’ Python support had been uninstalled (and you probably want to have it) so just reinstall the python-qgis package
- Tada! I’m enjoying SOSIges!
As an added bonus, it feels like handling vector data is faster with the newer library, but that might be my imagination.
Note: If you would like to convert .sosi files into a different format, you want the ogr2ogr tool. Have a look at my Windows version of this post for a little more info on that.