wiki:SOSI

Version 8 (modified by sbl, 11 years ago) ( diff )

Build hints for Windows added

Build GDAL with support for the Norwegian SOSI format

Unix (Tested on Ubuntu 12.04)

Download and build the FYBA library from the National Mapping Authority of Norway (Statens kartverk)

The SOSI driver requires the FYBA library to read and write files in the Norwegian geodata standard format SOSI. OpenFYBA is, a source code release of the FYBA library, is distributed by the National Mapping Authority of Norway (Statens kartverk) and can be downloaded from their git repository: (https://github.com/kartverket/fyba)

git clone https://github.com/kartverket/fyba
cd fyba
autoreconf --force --install
./configure
make
sudo make install
cd ..

This procedure installs the FYBA library (libfyba) and it`s dependencies (libfygm and libfyut) in /usr/local/.

Download and build GDAL

For the time being, convenient access to the SOSI driver is provided by a GDAL version hosted on the git repository of the National Mapping Authority of Norway (Statens Kartverk): https://github.com/kartverket/gdal

git clone https://github.com/kartverket/gdal gdal_sosi
cd gdal_sosi/gdal
#Recreate the configure script with SOSI support
sh autogen.sh
./configure --with-sosi
make
sudo make install

In addition, some Linux distributions require the shared library cache to be updated after install:

sudo ldconfig

Windows (MS Visual Studio)

Download precompiled .lib- and include-files of the FYBA library from https://github.com/kartverket/fyba (from folders "include" and "Lib"). Or rebuild them using the project files for MS Visual Studio provided there. The FYBA library - where the SOSI-driver is build on - consists of three parts: GM.lib, UT.lib, and FYBA.lib.

Download GDAL.

Uncommend lines regarding SOSI-support in GDALs nmake.opt and set path to lib-files and include folder for FYBA .

Build GDAL with MS Visual Studio http://trac.osgeo.org/gdal/wiki/BuildingOnWindows.

There are older downloads including binary versions for Windows on: https://bitbucket.org/kartverket/fyba/src/e0a53133586261258e9333ce314ba1df0a1fb63e/releases?at=releases

Testing and using the SOSI driver

To test if the driver has been loaded, execute the following (look for "SOSI" in the results):

ogrinfo --formats

Then test with a sample file (such as http://trac.osgeo.org/gdal/attachment/ticket/3638/20BygnAnlegg.SOS or http://trac.osgeo.org/gdal/attachment/ticket/3638/20Tekst5000biterISO8859-10.sos):

ogrinfo 20BygnAnlegg.SOS
...

Note: When accessing a SOSI file, the SOSI driver writes out indices into a subfolder within the same directory where your SOSI files (.sos) are stored. Therefore you have to have write access to the directory containing your SOSI files.

Open Tickets

No results

Note: See TracWiki for help on using the wiki.