Opened 14 years ago

Closed 14 years ago

#3690 closed enhancement (fixed)

Enhancements to OGR OCI driver to support creation of non-spatial tables

Reported by: PeterHalls Owned by: ilucena
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: oci
Cc: warmerdam

Description

Some GML datasets comprise a mixture of spatial and non-spatial dataset information. Hitherto, the OCI driver has always created output tables including a geometry column. This patch avoids the creation of a geometry column for a new feature layer when the geometry type is wkbNone; for all other values of geometry type the geometry column is created as before. This change will also enable programmers to use GDAL alone where both spatial and non-spatial tables must be manipulated, avoiding the need for multiple api's.

The changes affect ogrocidatasource.cpp (ogrocidatasource.changes) and ogrocitablelayer.cpp (ogrocitablelayer.changes). The diff files and modified sources are submitted.

Attachments (4)

ogrocidatasource.changes (1.2 KB ) - added by PeterHalls 14 years ago.
diff output between supplied and modified sources
ogrocidatasource.cpp (33.5 KB ) - added by PeterHalls 14 years ago.
modified source of ogrocidatasource.cpp
ogrocitablelayer.changes (2.3 KB ) - added by PeterHalls 14 years ago.
diff output between supplied and modified sources
ogrocitablelayer.cpp (66.3 KB ) - added by PeterHalls 14 years ago.
modified source of ogrocitablelayer.cpp

Download all attachments as: .zip

Change History (7)

by PeterHalls, 14 years ago

Attachment: ogrocidatasource.changes added

diff output between supplied and modified sources

by PeterHalls, 14 years ago

Attachment: ogrocidatasource.cpp added

modified source of ogrocidatasource.cpp

by PeterHalls, 14 years ago

Attachment: ogrocitablelayer.changes added

diff output between supplied and modified sources

by PeterHalls, 14 years ago

Attachment: ogrocitablelayer.cpp added

modified source of ogrocitablelayer.cpp

comment:1 by warmerdam, 14 years ago

Cc: warmerdam added
Keywords: oci added
Owner: changed from warmerdam to ilucena

Ivan,

Is this something you have funded time you can apply to it? Either via the maintainer contract or other?

comment:2 by ilucena, 14 years ago

I can take a look at that.

comment:3 by ilucena, 14 years ago

Resolution: fixed
Status: newclosed

Frank,

I applied the changes to the current on trunk. It looks consistent but it seems like Peter started his changes on 1.7 or some older version of the code so I needed to accommodate things with the latest fix/improvements.

It seems to be working fine now but note that since the newly created table does not have a geometry, it doesn't shows up on a ogrinfo query, example:

% ogr2ogr -f "OCI" oci:scott/tiger@orcl sample.csv
% ogrinfo oci:scott/tiger@orcl
INFO: Open of `oci:scott/tiger@orcl'
      using driver `OCI' successful.
1: ABC
2: USGS24KGRID
3: TEST

r20120

Note: See TracTickets for help on using tickets.