Hi, I noticed a huge difference in running either InitSpatialMetaData() or InitSpatialMetaData(1) on a rather weak Windows 32-bit computer with Spatialite version 4.1.1. The first variant took 18 minutes vs. 3 seconds for the latter.
This must have to do with making either one big or thousands of small transactions when populating the spatial_ref_sys table. https://www.gaia-gis.it/gaia-sins/xmlBlob/spatialite-sql-latest.html. I am not sure from which Spatialite version this setting is supported but it might be worth checking how GDAL behaves. I think it should use "InitSpatialMetaData(1)" if it is supported. Option is said to be less safe than the default setting "transaction=false" but function is used when an new database is created so there is no risk for corrupting data. The speed of the function with default value is so awfully slow that it feels like a bug in Spatialite. -Jukka Rahkonen- _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
