[QGIS-Developer] QGIS enhancement: export to GeoPDF
Even Rouault
even.rouault at spatialys.com
Thu Jul 5 02:48:47 PDT 2018
> * Do you have any ideas how to technically solve the issue of
> retaining style while also allow the querying of vector features?
> Perhaps export as raster to retain style with invisible (transparent)
> vector overlays?
If you do exactly as you mention, that would be confusing for the users as in
the layer tree they would see 2 layers, one rasterized, and the other one with
the vector. But technically in PDF you can mix raster and vector in the same
layer, so, in theory, you could add the invisible vector overlays in the same
layer as the raster info.
I believe the GDAL PDF writer could be extended to do that. You would need to
provide it with some configuration with a description of a layer hierarchy,
and for each layer its raster (or rasterized vector) and vector components.
If you have many vector layers, the size of the PDF and the drawing time could
become quite big with that approach though
There could be some difficulties with ponctual symbols. QGIS would have to
describe them as polygons with some extent so that they can be clicked on.
Can QGIS generate rasterized vector with proper alpha component ? Testing
quickly the export of a vector layer to PDF with rasterization, the generated
image doesn't contain an alpha mask.
> I always thought geopdf was a proprietary format? I googled:
> https://en.wikipedia.org/wiki/GeoPDF
> vs
> https://en.wikipedia.org/wiki/Geospatial_PDF
GeoPDF is a trademark of TerraGo for the OGC GeoPDF Encoding Best Practice
Version 2.2 (08-139r3):
http://portal.opengeospatial.org/files/?artifact_id=40537
GDAL can read and generate that encoding. One downside though is that I
remember that some versions of the TerraGo toolbar refused to recognize the
geospatial info from GDAL generated PDF because they were not signed by
TerraGo key (technical measure to create a monopoly). Maybe this has changed.
Another implementation is Adobe Supplement to ISO 32000:
http://www.adobe.com/devnet/acrobat/pdfs/adobe_supplement_iso32000.pdf
> Mmm, from http://www.gdal.org/frmt_pdf.html
> You need gdal build with special (pdf)libs, gdal is not build by default
> with those...
Debian and Ubuntu GDAL builds link against Poppler so you have everything what
is needed from a GDAL point of view. Actually for creation-only of PDF, GDAL
does it 'at hand', so doesn't even require those libraries. It needs them for
reading or for in place editing, like adding georeferencing to an existing
file.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the QGIS-Developer
mailing list