<p dir="ltr"><br>
On 16 Jun 2016 21:27, "Frank Broniewski" <<a href="mailto:frank.broniewski@gmail.com">frank.broniewski@gmail.com</a>> wrote:<br>
><br>
> Ok, finally l found some time to investigate into making GeoPDF files from QGIS map composer PDFs. I've created a small python script to aid me in the creation of the GeoPDF (<a href="https://github.com/frankbroniewski/GeoPDF">https://github.com/frankbroniewski/GeoPDF</a>). It basically takes parameters from QGIS (map position in the page, map extent) and writes them to the PDF. There are 2 screenshots in the git which show the current data values for my test.pdf test subject. The map-composer.png shows the map in the QGIS map composer with the important values for georeferencing at the right side. layer-in-qgis.png shows the (unfortunately misaligned) GeoPDF in the QGIS main window.<br>
> My gdal_edit call is as follows:<br>
><br>
> gdal_edit.bat -mo "NEATLINE=POLYGON((30 30, 30 170, 220 170, 220 30, 30 30))" -a_srs "EPSG:31466" -a_ullr 2549800.000 5491000.000 2555800.000 5486600.000 test.pdf<br>
><br>
> From reading the docs (the OGC ones) I thought creating a neatline and adding coordinates to it would be more or less sufficient. Looking at layer-in-qgis.png shows that gdal_edit did not (as what I expected at first) write the coordinates to the neatline but to the whole page area.<br>
><br>
> Is there a way to add the coordinates to the neatline instead of the whole PDF page? I could calculate the page's extent and use these values, but maybe there's a more clever approach?</p>
<p dir="ltr">I can't help with this, but you may be interested to know that QGIS 2.16 will natively georeference composer PDF outputs. This feature was added during the recent hackfest in Girona.</p>
<p dir="ltr">Cheers,<br>
Nyall<br></p>
<p dir="ltr">><br>
> I've also noticed that Adobe Acrobat Reader does not display any coordinates when using the measurement tool. Any ideas why this is not working?<br>
><br>
> The python script (polygon.py - the name's somewhat stupid) is atm only used to assemble the gdal_edit call while taking the map extent and map frame aka neatline position along with an epsg code. I'm on windows (osgeo4w64) and using subprocess.call on gdal_edit causes an error with the -a_ullr switch. Probably some parsing errors or whatnot. Anyway, copy&paste is as good for the moment.<br>
><br>
> So, any comments on how to proceed with the neatline are greatly appreciated.  I will continue to do my own research and report back on any successful steps achieved.<br>
><br>
> Frank<br>
><br>
><br>
><br>
> Am 18.05.2016 um 16:50 schrieb Frank Broniewski:<br>
>><br>
>> Hi,<br>
>><br>
>> I want to turn my QGIS map composer PDF into a GeoPDF or a geospatial PDF. Unfortunately that is not supported, just on a per layer basis from within the main program. I could export my map to TIFF with a world file and use GDAL on that, but I'd like to maintain the vectors and text in the output.<br>
>> Since GDAL supports the creation of GeoPDF, I'd like to ask if there is some kind of documentation on the web where the standard is described of if someone knows an OpenSource library which supports the creation of GeoPDF.<br>
>> I thought of writing a, preferable in Python, program which would add the necessary tags and data to the PDF in order to turn it into a GeoPDF. But I am already stuck at the beginning, because I simply cannot find a good standard documentation. What does GDAL do to turn a raster file into a GeoPDF? I guess I could read the source, but I have no clue on the C-language so I thought I ask here beforehand.<br>
>><br>
>> Thanks,<br>
>><br>
>> Frank <br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a> </p>