[gdal-dev] create GeospatialPDF using Python

Luca Delucchi lucadeluge at gmail.com
Fri Apr 17 04:11:15 PDT 2015


On 13 April 2015 at 13:25, Luca Delucchi <lucadeluge at gmail.com> wrote:
> Hi all,
>

Hi devs,
some updates

>
> For vector it seems quite simple, just writing a new vector and insert
> all features but I'm not able to create it, my code [0] is not
> returning any error but I cannot find the output file
>

Now I'm able but I'm still not able to read it with GDAL, my example
is here [2], maybe some Creation Options is missing?
Also If I'm using gdal_translate after that I'm not able to read with gdalinfo

gdal_translate -of PDF ../STEM/data/OFD/060140_ravina_OFD.tif my.pdf
gdalinfo my.pdf

ERROR 4: `my.pdf' not recognised as a supported file format.

gdalinfo failed - unable to open 'my.pdf'.


> How the "Creation Options" should be passed to CreateCopy?

Maybe I found it

dst_ds = driver.CreateCopy( dst_filename, src_ds, 0,
                                [ 'TILED=YES', 'COMPRESS=PACKBITS' ] )

I was looking to GeospatialPDF format and it seems there is no
Creation Options to pass the style of vector file.
Is also this an enhancement to do?

What is the suggested way to create GeospatialPDF with raster and
styled vector together?

>
> Thanks
> Luca
>
> [0] http://pastebin.com/V8aNqWXD
> [1] http://pastebin.com/gNu2gbtF
>

[2] http://geodati.fmach.it/tmp/prova.pdf

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org


More information about the gdal-dev mailing list