Ticket #1705 (assigned defect)

Opened 6 years ago

Last modified 6 years ago

OGR SQLite driver usage + docs patch

Reported by: neteler Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

Frank,

I try to figure out how to use the SQLite driver but sort of fail. Attached a patch with a simple example, but I assume that it should be different since I don't manage to put two SHAPE files into a single SQLite file (the docs state that "adding tables to existing ones" is possible).

Would you mind to add a second example, extending the attached patch? The mailing list archives are do not contain a single example...

Thanks, Markus

Attachments

drv_sqlite.diff Download (0.8 KB) - added by neteler 6 years ago.
SQLite documentation patch

Change History

Changed 6 years ago by neteler

SQLite documentation patch

Changed 6 years ago by neteler

Forgot to mention that this is relevant for teaching people to use the new 'db.in.ogr' in GRASS:

 http://grass.itc.it/grass63/manuals/html63_user/db.in.ogr.html

Markus

Changed 6 years ago by warmerdam

  • status changed from new to assigned

Markus,

I successfully added a new table to an existing sqlite database like this:

ogr2ogr -update out.db data/esri/shape/eg_data 3dpoints

I'm a bit leery about adding these examples to the sqlite page as they don't show anything specific to the sqlite driver. I generally try to avoid OGR client program specific examples in OGR driver documentation as it may be confusing to people using OGR in a very different context (for instance, in MapGuide?, or QGIS or GRASS). I've obviously relaxed this before for some complex drivers but in this case we aren't showing anything specific about the sqlite driver at all.

Changed 6 years ago by neteler

Frank,

certainly it's up to you. But I spent quite a while on digging around to no avail. Having such example on hand, I could do coding instead :) I guess that I confused -append and -update.

Then, it is specific since it is quite different from SHAPE and PostgreSQL usage (my other favourites) due to the structure

ogr2ogr -update DBfile path map

I don't think that this confuses users in a different context since they won't use 'ogr2ogr' but the API (or whatever).

Note: See TracTickets for help on using tickets.