I am using ogr2ogr to extract point data from a Spatialite db to a csv file:-

ogr2ogr -f "CSV" commandtmp.csv dtm2.sqlite -lco GEOMETRY=AS_XYZ -progress -explodecollections

the Spatialite db is 7GB and it takes days to extract the point data to a 15GB csv file.

Are there any ways to speed this up?

  • run top or glances and see what your choke point is during the process. disk, CPU or memory. Commented Jul 9, 2015 at 15:14

1 Answer 1


It works quite fast for me. I used http://download.geofabrik.de/europe-latest.osm.pbf as sample data and converted the points layer into Spatialite database as

ogr2ogr -f sqlite -dsco spatialite=yes europe_points.sqlite europe-latest.osm.pbf points -progress -lco spatial_index=no

Then I created CSV file as

ogr2ogr -f "CSV" commandtmp.csv europe_points.sqlite -lco GEOMETRY=AS_XYZ -progress -explodecollections -sql "select geometry from points"

It took only 20 minutes to write out the 1 GB sized CSV file. I used GDAL-devel version on Windows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.