Hi,

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: 
https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files).

Looking at the logs, I can see that, firstly, a “temporary database” file 
(*.temp.db) is created. Some things are notable:

- this step seems to be CPU intensive compared to the creation of the actual 
pbf files
- the temporary database file is not being written to the output file directory 
(S3 storage in this case) as stated in the documentation
- the dataset creation option `TEMPORARY_DB` (see: 
https://gdal.org/drivers/vector/mvt.html#dataset-creation-options) seems to be 
ignored (I tried writing the file to a local directory but no such file shows 
up)
- my guess is that the file is only kept in memory (which would be /vsimem/ if 
I’m correct)

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?

I’m looking forward to some discussion on this topic. I will happily try to 
contribute where I can.

Regards,

Leo
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to