[gdal-dev] gdal2tiles PDF --config GDAL_PDF_DPI option

Even Rouault even.rouault at spatialys.com
Sat Sep 19 06:15:04 PDT 2020

On samedi 19 septembre 2020 03:49:40 CEST py_qgis_user wrote:
> I've been looking into the gdal2tiles code (both version 2.4.0 and 3.1.2),
> but am quite unfamiliar with the gdal python library. I'm hoping for some
> pointers on what I can test/look into to get the results i'm hoping for.
> The input is a georeferenced PDF, with it's content being svg/vector instead
> of raster. I noticed that using the* --config GDAL_PDF_DPI* option allows
> for higher quality tiles at high zoom levels. E.g.:
> gdal2tiles -r antialias -a 255 input.pdf test1 --config GDAL_PDF_DPI 600
> But when also using the option *--processes=* (any number),  the
> GDAL_PDF_DPI is somehow ignored/misinterpreted:
> In V2.4.0, the option seems to be ignored, as tiles are created exactly the
> same to the output with --config and --processes
> In V3.1.2, the output is different, but faulty. It creates tiles according
> the new DPI size/resolution, but only the zone of the original DPI
> size/resolution contains content (e.g:for a pdf with size 100x100 at default
> dpi, at double the DPI it will create tiles for the same georeferenced area
> for a PDF at size 200x200, but only the top-left 100x100 contains content,
> the other has nodata values)
> Any ideas? Preferably in V2.4.0.

See https://github.com/OSGeo/gdal/issues/2950#issuecomment-695211659 for fix and 


Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200919/a45268af/attachment.html>

More information about the gdal-dev mailing list