Wisconsin Geospatial News

Customizing Layer Content in Geospatial PDFs

Geospatial PDFs are traditional PDF (portable document format) files with added georeferencing information, which makes it possible to use these files in cartography and GIS. These files are readable in Adobe Acrobat software, as well as other PDF readers, and can be imported into some GIS packages (such as QGIS) to serve as ready-made base maps. Geospatial PDFs are especially useful for navigation in areas where WiFi and cell phone service is unavailable, since they can be transferred to a mobile device and used with a GPS-enabled app.

Geospatial PDFs are also sometimes referred to as GeoPDFs, although there some differences that I will not get into here. For a deeper explanation of geospatial PDFs you can refer to this SCO publication last updated in 2019.

The US Geological Survey (or USGS) has been delivering topographic maps to the public in geospatial PDF format for over a decade. The agency uses the name “US Topo” to refer specifically to topographic maps published in 2009 and later that are mass-produced using national GIS databases. US Topos are modeled on the familiar 1:24,000-scale 7.5-minute USGS “topo quads” that many readers will be familiar with, but are produced on a much more frequent update cycle. For Wisconsin, four series of US Topos have been published since the program began in 2009.

The USGS provides a concise description of the file format here. They also distinguish between the current generation of geospatial PDFs produced in an open source format, and their earlier proprietary GeoPDF format maps. The best place to go for US Topos is probably topoView, a free online app from the USGS that allows users to view, inspect and download US Topos from the desktop.

The topoView app also contains USGS topographic maps from the Historical Topographic Map Collection, which often go back as far as the 1890s in some areas. The familiar 7.5-minute USGS topo quads are also available on topoView, but unless you need these maps for historical analysis, you should download and use the more current US Topos instead. Not only are US Topos more up-to-date, but they offer customization options that the earlier topo map editions do not.

Customizing US Topos

One way that US Topos can be customized is by changing the visibility of different layers. US Topos use layers to organize different types of map content into categories. Figure 1 shows a portion of the 2018 Miscauno Island, Wisconsin, US Topo, as it appears in a PDF reader (in this case, Adobe Acrobat Pro).

Fig.1 – Portion of Miscauno Island US Topo showing layer control.

You can expand the layer list by choosing Expand All from the Layers dropdown menu, as shown in Figure 2.

Fig.2 – Expanding the layer list.

Figure 3 shows the layers visible by default for this US Topo.

Fig. 3 – Default visible layers for the Miscauno Island map.

Customizing the map by making different layers visible or invisible is simple, by just clicking on the little eyeball icons next to each layer. Figure 4 shows an example where some of the layers (marked with a red X) have been turned off and are no longer visible. Some of these layers are on the map frame itself (like “Woodland”) and others contain content for the map margins or “collar.” Note that since layers are grouped hierarchically, it is possible to make an entire group of layers visible or invisible by clicking on the group name (such as “Terrain”).

Fig. 4 – Customizing layer visibility.

The organization of features into layers on US Topos isn’t perfect; for example you can’t turn off hydrographic feature names without also turning off the hydrographic features themselves. Still, the ability to select which layers you want to appear on the map provides flexibility in map appearance that is not possible with the traditional 7.5-minute topo quads.

As you can see, modifying the map by changing layer visibility is pretty simple. The one complication, however, is that the results cannot easily be saved as a customized geospatial PDF. You can’t simply use “Save As…” to save the customized version of your map, as the PDF will contain all of the original layers you started with. There isn’t a a simple way to permanently delete layers from the PDF. And you can’t export the map or print it to a PDF format because the georeferencing information will be lost.

The solution I have found for this problem is described below. It is fairly straightforward but requires use of the Print Production tool found in Acrobat Pro. The approach won’t work in Acrobat Reader, unfortunately. It’s possible there are other PDF readers that might work instead of Acrobat Pro. It’s also possible that there are other workflows that will achieve the same effect without the need for Acrobat Pro. If so, I would be interested in hearing about them.

Saving a Customized Geospatial PDF

To save a customized version of a US Topo (or other geospatial PDF) you can use the Print Production tool in Acrobat Pro. This tool is accessed in the Tools tab as shown in Figure 5.

Fig. 5 – Choosing the print production tool.

After choosing this tool, a panel will appear on the right-hand side of the window. From this panel, choose the Preflight tool (Figure 6), which will cause the Preflight Menu to appear (Figure 7).

Fig. 6 – Choosing the Preflight tool.

Preflight tools are usually used to examine and fix the contents of a file to optimize it for printing purposes. However, Acrobat Pro also has a number of preflight “fixups” that can be used to address specific problems or carry out specific tasks. These fixups are identified with a small gray wrench symbol. As shown in Figure 7, click on the gray wrench symbol to see the fixups available, expand the Layers section, and then click on the fixup that says “Discard hidden layer content and flatten visible layers.”

Fig. 7 – Running the layer content fixup.

When the tool finishes executing, you can save the result as a PDF using whatever filename you want (Figure 8).

Fig. 8 – Saving the customized map as a geospatial PDF.

The saved file will retain the georeferencing information that makes it a geospatial PDF. Note that all of the visible layers will have been flattened into a single map layer (Fig. 9). Thus, further customization is not possible without going back to original US Topo.

Fig. 9 – The customized map.

Using Your Customized Geospatial PDF

You can use your customized geospatial PDF just like any other geospatial PDF. Figure 10 shows the customized map in QGIS, where it has been overlaid with parcel polygons. Since the PDF is georeferenced, it can be treated like any other GIS layer.

Fig. 10 – The customized map in QGIS, with parcels layered on top.

You can also transfer the PDF to your mobile phone where it can be used with a GPS-enabled app. Figure 11 shows the map in the Avenza app. With this app you can track and record your GPS location as well as plot photographs using their embedded geotag information. These can be useful capabilities when doing field work in remote areas. The Avenza app is available for free on the Apple Store.

Fig 11 – The customized map in the Avenza mobile app.

One additional piece of software that may be useful is the TerraGo GeoPDF Toolbar, also available for free. Once installed, this toolbar adds additional capabilities to Adobe Acrobat, including the ability to read the PDF metadata describing the map’s geographic reference system. Figure 12 shows where to access this metadata via the TerraGo Toolbar.

Fig. 12 – Accessing the TerraGo Toolbar.

In Figure 13, you can see the “Map Coordinate System” for the PDF by clicking on the More tab for Map Frame 3, which is the frame for the “Map Layers” in the PDF (i.e., the main map of the PDF).

Fig. 13 – Coordinate system metadata.

In this case, the coordinate system is an NAD 83 version of UTM (Universal Transverse Mercator) for Zone 16 North. The text for the Map Coordinate System is the WKT (“Well Known Text”) markup language representation of this projection, and is identified by EPSG code 26916. This is useful information, because it can be used to establish the coordinate system of a GIS project (for example, in QGIS) before importing the geospatial PDF. This can result in faster import and draw times, since the GIS software does not need to reproject the PDF on the fly.

Final Notes

Let me know if you run into any special cases or exceptions that cause this workflow to fail. Geospatial PDFs are still not widely used in GIS or by mapping professionals in general, so software limitations do exist.

Also please note that all references to commercial companies and their products — including Adobe, Apple, Avenza and TerraGo — are for informational purposes only and not intended as endorsements of these companies and products.