#6503 closed defect (fixed)

Make SOSI driver support more geometry types (including curved geometries)

Reported by: sbl Owned by: warmerdam
Priority: normal Milestone: 2.1.1
Component: default Version: 2.1.0
Severity: normal Keywords: OGR, SOSI
Cc:

Description

In the newer SOSI files, (amongst others) curved geometries are used at an increasing level. These curved geometries (as well as symbol geometries from SOSI) are not supported by the OGR driver and lead to an error.

There is a (partly) newer version of the OGR-SOSI driver at the github repository of our mapping authority: https://github.com/OSGeo/gdal/compare/trunk...kartverket:trunk With a version of the driver that supports these geometries.

Especially this commit contains changes that might fix the issue with geometry type 5 (and 20), plus provides some improvements on attribute-type mapping: https://github.com/OSGeo/gdal/commit/321bc979f112e46e05e45a9363d39de5343709fc

Would be nice to get those changes into trunk.

Attachments (2)

ADM_kommune_0620_Hol.sos (914.1 KB) - added by sbl 19 months ago.
Example file with geometry type 5 (BUEP) which throws an error
ogr_sosi_with_tools.diff.zip (163.6 KB) - added by sbl 19 months ago.
Fix for the BUEP issue and some field type enhancements; copied from: https://github.com/kartverket/gdal

Download all attachments as: .zip

Change History (6)

Changed 19 months ago by sbl

Attachment: ADM_kommune_0620_Hol.sos added

Example file with geometry type 5 (BUEP) which throws an error

Changed 19 months ago by sbl

Fix for the BUEP issue and some field type enhancements; copied from: https://github.com/kartverket/gdal

comment:1 Changed 19 months ago by sbl

Please find attached a diff whichshould fix this issue.

I had to zip the diff as it hit the file size limit in trac if uncompressed. It contains the changes from Kartverket which I manually added to trunk. The diff is tested successfully on Ubuntu 14.04 LTS and latest trunk. The above file opens now nicely, plus that fields are mapped better and renamed.

Maybe also relevant for backporting?

It seems that the (new in trunk but from 2013) ogrsosidatatypes.h would benefit from an update... Have to find and check the latest SOSI-DB...

comment:2 Changed 19 months ago by sbl

Keywords: OGR SOSI added
Milestone: 2.1.1
Version: unspecified2.1.0

comment:3 Changed 19 months ago by Even Rouault

trunk r34200 "SOSI: update to latest version of https://github.com/kartverket/gdal. Make SOSI driver support more geometry types (including curved geometries) plus provides some improvements on attribute-type mapping. Fix some memory errors/leaks. Disable by default non working creation code (#6503)"

I've made a few changes to fix a memory error usage&memory look. Regading tools/, I've no kept the 2 .xml files in svn but moved them to http://download.osgeo.org/gdal/tools/sosi/ I've also updated the Windows makefile, but didn't/couldn't test it. I'm a bit reluctant to backport while someone hasn't checked that this still compiles fine under Windows.

Small test file would be welcome (I guess this could be done manually since the format seems to be text based).

comment:4 Changed 17 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 34420:

Backport of trunk r34200 + r34419: update to latest version of ​https://github.com/kartverket/gdal. Make SOSI driver support more geometry types (including curved geometries) plus provides some improvements on attribute-type mapping. Fix some memory errors/leaks. Disable by default non working creation code (fixes #6503)

Note: See TracTickets for help on using tickets.