Generating maps with ArcGIS and python
TrailPeople planning map, LiDAR data courtesy USGS

Generating maps with ArcGIS and python

TrailPeople does planning for trails and bike paths. I generate lots of PDF maps for them. It seems every project we do requires a series of 6-8 or more pages for each map set and many, many revisions.

Since we do trails, the maps are often long and skinny and I wanted a way to put two on a sheet. This does not just save on paper, it also means you can see much more details on a single sheet, because the map scale can be increased.

I use ESRI ArcGIS Desktop 10.5, and it does not directly accommodate the combination of multiple maps per page with generate map books (what they call "data driven pages".)

To get around this, I created a python script to drive ArcMap (via the ESRI arcpy module.)

I also needed a way to generate more than one map series from the same layout, for example one with filled contours like in the banner at the top of this article and another series with orthophotos; my script accommodates this in its settings, too by allow you to selectively turn on and off layers and then run another series.

The script uses an ArcMap MXD file to describe the map series, and a JSON file that tells it what goes on each page in the output.

I published the project on github, here: Geo-CEG/arcmap_2maps_per_page. Grab it and change it and use it. Learn from it.

There is a lot more detail on this project in the github README file, and the project includes sample settings, data, and the MXD and shapefiles to that I use test it.

Are you interested in projects like this? Do you want me to write more? Do you need to know more about github or ArcGIS or Python??? Send feedback and comments, this is my first posting on LinkedIn and I need lots of encouragement!


Brilliant (as always!) I could really see this being useful for a lot of folks... I hope it gets the exposure it deserves here. Keep the posts coming!

Like
Reply

To view or add a comment, sign in

Others also viewed

Explore content categories