I hate to even say “GeoPDF”. It’s not a bad thing by any stretch. Much like saying “Mr Sid” I probably do it with a contorted facial expression. At some point I’m going to talk about some of the stuff Terrago has been doing with GeoPDF’s and Geopackage. Hopefully.
If you’ve kept up I’ve been slowly moving this project from ArcGIS to QGIS and it’s almost done. There are still a few processes I’m trying to work out with the client but it’s nothing more than a lack of understanding on my part. There are two hurdles left on my end though: Geodatabases and GeoPDFs.
I developed (for me) a fairly complicated map document that has been exported out of QGIS and delivered to the client’s client. The client’s client ended up being (and I had no clue) field personnel that didn’t want QGIS/ArcGIS/Complicated. So as part of the delivery IÂ needed to provide GeoPDF’s. Â I haven’t been. Well – I remembered and here we go.
If you’re working in ArcGIS you can export a PDF with “georeference information” attached. It also has layer information so you can click and do things with the PDF through acrobat reader and extract information. ArcGIS has had that ability for quite some time. There really isn’t an open source alternative to this functionality. You’re just stuck if you’re looking for a button click solution.
After doing some digging here is what I came up with. You can make a Georeferenced PDF out of QGIS. It’s a four step process.
- In your QGIS Composer document You need to make one change on the composer tab:
2. Then you want to export your document as a tif file. Yes you are making a georeferenced tif. I know.
Now from command line you get run two commands.
- The first command makes your tif with a tfw file a geotiff: gdal_edit.py -a_srs EPSG:2274 output.tifÂ
- The next and final command gives you a georeferenced pdf: gdal_translate -of PDF output.tif output.pdfÂ
What if you have a pile of them to do? Learn some scripting. I created a bash script (have I mentioned I’m doing this all on linux) and exported everything to a pdf.
Pros:
- I’m still doing all of this for free in easily accessible software
- There are a lot of options for making Geospatial PDF’s from GDAL ->Â http://www.gdal.org/frmt_pdf.html
Cons:
- You have to drift back to command line and I’m debating how to explain this to submit a enhancement to the QGISÂ group. It may be already.
- It’s not a true “GeoPDF”. I consider this a georeferenced PDF. We have none of the enhancements from Terrago
- File size is a bit large and I really need to play with resolution and a few other things. Right now I’m in a 8mb range for an output.
- There are a lot lot of options for making Geospatial PDF’s from GDAL ->Â http://www.gdal.org/frmt_pdf.html
BUT – it’s works with their software and the client is happy for now. So I’m left with one last hurdle: geodatabases. I know what to do there – I just need to sit down for a bit and do it.