<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi,<div><br></div><div>I’m creating vector tiles from a PostGIS database using ogr2ogr with the MVT driver. The region is quite large and I’m creating tiles for levels 0-15, so the process takes quite some time (hours). The tiles are written directly to a S3 storage using the /vsis3/ virtual file system (see: <a href="https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files">https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files</a>).</div><div><br></div><div>Looking at the logs, I can see that, firstly, a “temporary database” file (*.temp.db) is created. Some things are notable:</div><div><br></div><div>- this step seems to be CPU intensive compared to the creation of the actual pbf files</div><div>- the temporary database file is not being written to the output file directory (S3 storage in this case) as stated in the documentation</div><div>- the dataset creation option `TEMPORARY_DB` (see: <a href="https://gdal.org/drivers/vector/mvt.html#dataset-creation-options">https://gdal.org/drivers/vector/mvt.html#dataset-creation-options</a>) seems to be ignored (I tried writing the file to a local directory but no such file shows up)</div><div>- my guess is that the file is only kept in memory (which would be /vsimem/ if I’m correct)</div><div><br></div><div>Is it possible to skip the step of first creating the temp db and directly create tiles from PostGIS or any other data source? Where/how exactly is the database file stored? Any ideas on optimizing the process?</div><div><br></div><div>I’m looking forward to some discussion on this topic. I will happily try to contribute where I can.</div><div><br></div><div>Regards,</div><div><br></div><div>Leo</div></body></html>