Changes between Version 9 and Version 10 of SOSI
- Timestamp:
- Oct 24, 2013, 12:41:51 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SOSI
v9 v10 7 7 * General information on the Norwegian SOSI format in Norwegian[[BR]] 8 8 ([http://www.kartverket.no/Standarder/SOSI/SOSI-standarden-del-1/]) 9 * Github repository of the OpenFYBA-library wich is required for the OGR-SOSI-driver[[BR]] 10 ([https://github.com/kartverket/fyba]) 9 11 * Initial discussion about the integration if a driver for the Norwegian SOSI format[[BR]] 10 12 ([http://trac.osgeo.org/gdal/ticket/3638]) 11 13 * Updates on the activities of the National Mapping Authority of Norway (Statens kartverk) on that topic (in Norwegian)[[BR]] 12 14 ([http://labs.kartverket.no/sos/]) 15 13 16 14 17 … … 34 37 === Download and build GDAL === 35 38 36 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):37 [https://github.com/kartverket/gdal]38 39 39 {{{ 40 git clone https://github.com/kartverket/gdal gdal_sosi 41 cd gdal _sosi/gdal40 svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal 41 cd gdal 42 42 #Recreate the configure script with SOSI support 43 43 sh autogen.sh … … 58 58 The OpenFYBA library - where the SOSI-driver is build on - consists of three parts: GM.lib, UT.lib, and FYBA.lib. 59 59 60 Download GDAL source code from [http://trac.osgeo.org/gdal/wiki/DownloadSource] for GDAL version 1.9.2 or later .60 Download GDAL source code from [http://trac.osgeo.org/gdal/wiki/DownloadSource] for GDAL version 1.9.2 or later (plugin-option available since revision 26547). 61 61 62 Uncommend lines regarding SOSI-support in GDALs nmake.opt and set path to where you have your lib-files and include folder for OpenFYBA e.g.: 62 Uncomment lines regarding SOSI-support in GDALs nmake.opt and set path to where you have your lib-files and include folder for OpenFYBA e.g.: 63 If "SOSI_PLUGIN = YES" is uncommented SOSI-support is built as a plugin and the plugin-.dll deployed in the gdalplugin directory. 63 64 64 65 {{{ 65 66 # Uncomment for SOSI support 66 67 SOSI_ENABLED = YES 68 SOSI_PLUGIN = YES 67 69 SOSI_INC_DIR = -IC:/fyba/include 68 70 SOSI_LIBS = C:/fyba/Lib/GM.lib C:/fyba/Lib/UT.lib C:/fyba/Lib/FYBA.lib … … 74 76 [https://bitbucket.org/kartverket/fyba/src/e0a53133586261258e9333ce314ba1df0a1fb63e/releases?at=releases] 75 77 76 == Testing and usingthe SOSI driver ==78 == Testing the SOSI driver == 77 79 78 80 To test if the driver has been loaded, execute the following (look for "SOSI" in the results): … … 91 93 }}} 92 94 95 == Usage examples == 96 97 Convert layers of all SOSI-files in the current directory to shape-format: 98 {{{ 99 dir=$(pwd) 100 for s in $(ls ${dir}/*.sos) 101 do 102 name=$(echo $s | cut -f1 -d'.') 103 layers=$(ogrinfo $s) 104 if [ $(echo $layers | grep points | wc -l) -eq 1 ] ; then 105 ogr2ogr ${name}_pnt.shp $s points 106 fi 107 108 if [ $(echo $layers | grep lines | wc -l) -eq 1 ] ; then 109 ogr2ogr ${name}_lin.shp $s lines 110 fi 111 112 if [ $(echo $layers | grep polygons | wc -l) -eq 1 ] ; then 113 ogr2ogr ${name}_pol.shp $s polygons 114 fi 115 done 116 }}} 93 117 Note: 94 118 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.