On 19/01/10 01:23, Frank Warmerdam wrote:
Roald,
Would you mind filing a ticket on this? I think the CopyLayer()
method ought
to use transactions in a manner similar to ogr2ogr.
Best regards,
Hi Frank,
Done: http://trac.osgeo.org/gdal/ticket/3335
Thanks, Roald
___
Roald de Wit wrote:
Hi Even,
Thanks for this. Crschmidt *did* mention the transactions and I guess it
would work if I were to create an empty layer and walk through the
features one by one.
I was hoping to use the 'CopyLayer' method of a DataSource (for
simplicity's sake). It seems that you c
Hi Even,
Thanks for this. Crschmidt *did* mention the transactions and I guess it
would work if I were to create an empty layer and walk through the
features one by one.
I was hoping to use the 'CopyLayer' method of a DataSource (for
simplicity's sake). It seems that you can provide options to
Roald,
You should try using transactions as suggested on IRC. This does make a lot of
difference for SQLite.
if 'lyr' is the Python object for your SQLite layer :
lyr.StartTransaction()
... insert features
lyr.CommitTransaction()
Best regards,
Even
Le Monday 18 January 2010 06:32:47 R
Hi list,
Whilst trying to mimic ogr2ogr functionality in Python, I stumbled upon
an issue with writing to SQLite: it works, but it's painfully slow
(minutes instead of seconds).
The link below points to an example that can be used for reproducing the
behaviour:
http://rdewit.pastebin.com/f7