[gdal-dev] GDAL 2.1 and Norwegian SOSI

Blumentrath, Stefan Stefan.Blumentrath at nina.no
Wed May 4 00:32:13 PDT 2016


Hei again,

First of all, now the SOSI file opens fine again. So, many thanks for that!

Unfortunately, I now get a new error on ogrinfo ./ADM_kommune_0620_Hol.sos lines

Layer name: lines 
Geometry: Line String 
ERROR 4: Unrecognized geometry of type 5. 
ERROR 1: Feature 82 referenced by 2204, but it was not initialized. 
Aborted (core dumped)

I get it for polygons too. Geometries of type 5 are curved geometries which got introduced in SOSI version 4.5 - if I am not mistaken...

Geometry type 5 (BUEP) is defined in https://github.com/kartverket/fyba/blob/master/src/FYBA/fyba.h (Line 408)... Would it be sufficient to add something like:
        case wkbCompoundCurve: {
            pszSosi = ".BUEP";
            break;
        }
to: ogr/ogrsf_frmts/sosi/ogrsosilayer.cpp (not sure if the translation is 100% correct)

But maybe also trunk/gdal/ogr/ogrsf_frmts/sosi/ogrsosidatasource.cpp needs modification...?
(I am no programmer).

Seems to be an older issue and other GeometryTypes seem to cause trouble too:
http://gis.stackexchange.com/questions/132888/ogr2ogr-problem-converting-sosi-fil-to-kml-or-anything-else

Cheers,
Stefan

-----Original Message-----
From: Even Rouault [mailto:even.rouault at spatialys.com] 
Sent: 3. mai 2016 21:33
To: gdal-dev at lists.osgeo.org
Cc: Blumentrath, Stefan <Stefan.Blumentrath at nina.no>
Subject: Re: [gdal-dev] GDAL 2.1 and Norwegian SOSI

Le mardi 03 mai 2016 21:06:14, Blumentrath, Stefan a écrit :
> Dear GDAL-devs,
> 
> I just tried to open a Norwegian SOSI file with ogrinfo from GDAL 
> 2.1dev but get: FAILURE:
> Unable to open datasource `./ADM_kommune_2018_Masoy.sos' with the 
> following drivers.
> 
> 'ogrinfo --formats' does not list the SOSI driver either. But I am 
> sure I did compile with '--with-sosi' and gdal-config --dep-libs lists 
> the openfyba libs used for the driver.

Hum, I see this is actually a 2.1.0 regression.
Fix available in https://trac.osgeo.org/gdal/ticket/6500

> 
> So my question is,: were there any changes from 1.11 to 2.x which may 
> affect the driver? Any chance someone will make that working again?
> Unfortunately our mapping authority does not seem to be maintaining 
> the OpenFYBA lib any more (SOSI version 4.5 not yet supported), so I 
> can understand if you are not too keen on fixing the issue (if it is 
> not local).
> 
> Thanks for any help.
> 
> Kind regards,
> Stefan

--
Spatialys - Geospatial professional services http://www.spatialys.com


More information about the gdal-dev mailing list