A tale of six maps…

Wednesday, December 14, 2016

… and the stories they tell. The Washington Post ran a nice story earlier this month mapping the extent of infrastructure in the US. This is in response to Donald Trump’s (sketchy) plans to invest in infrastructure projects. This was subsequently followed up with a nice blog post on how they were created and, in particular, the courses of data and an idea of the data wrangling going on behind the scenes. What’s telling here is the simplicity of the rendering and that journalists use QGIS because its free, but that Photoshop and Illustrator (rather than GIMP and Inkscape) are still the graphic artists tools of choice. I wonder if this would be any different if there was GIS expertise on their teams to support the graphic designers…

Keep it simple…

Friday, December 2, 2016

Sage advice from John Lilly:

My big lesson was the importance of a simple message, and saying it the same way over and over. If you’re going to change it, change it in a big way, and make sure everyone knows it’s a change. Otherwise keep it static.

…and that goes for any type of communication. Keep the core message simple to understand because whilst the implications may be profound, your target audience needs to be able to take it in and interpret it unequivocally.

Shapefile or geodatabase?

Tuesday, November 29, 2016

A nice overview and comparison of the shapefile, personal geodatabase and file geodatabase over at the guys at GIS Geography. Its a good succinct summary and review of the pros and cons. They do note that the file geodatabase is proprietary (to Esri), but not that the shapefile is too. And whilst (quitea while ago) Esri published a whitepaper detailing the specification of the shapefile its worth noting that they have released the API to the file geodatabase as well.

Evidence Matters

Tuesday, November 29, 2016

Sense About Science kicked off their Evidence Matters campaign earlier this year and this month held a meeting in parliament to push the importance of policy decisions based upon factual evidence. That is, making decisions that have impact upon society for the benefit of all, not simply to push a political agenda or because it’s what politicians believe but not what evidence shows. And the corollary is ignoring evidence - when it has been collected and presented, don’t make a decision because you don’t like the evidence (the so-called “post-truth society“). It’s critically important for the community we share and the environment we inhabit. There shouldn’t be elitist strongholds on decision making, but egalitarian approaches that value all.

UPDATE: Cookie Cutter and ArcGIS 10.4

Monday, November 21, 2016

Way back in 2009 I published a paper on the Cookie Cutter which outlined a method (and accompanying script) for calculating the volume of drumlins. This worked in ArcGIS 9.2 using the Python interface to a number of ArcGIS toolbox tools. Fast forward 9 years since I first wrote the script and, not too surprisingly, it doesn’t work (thanks for telling me Arturs!).

I finally sat down a few weeks ago to bug fix the script which was actually easier than I thought it would. It’s actually comprised of two scripts - the first sets up some working directories and takes an input shapefile, splitting into a number of new shapelines (one per drumlin). The second script then performs the volume calculation on each drumlins. It turns out (given Im pretty much only calling Toolbox tools) that there wasn’t much to fix… a third party script splitting the initial shapefile had to be removed, a bug in the command adding a new field and then reference to ArcGIS 10.4 paths. For those wanting to use it, please download the attached files and follow the notes below.

  • I use WinPython 2.7 and then the excellent Spyder IDE to run the scripts from

  • in Spyder you need to change the Python console to the path of the one that ArcGIS has installed. Goto Tools -> Preferences -> Console -> Advanced Settings then change “Use the following Python Interpreter”. It should be something like:
    C:Python27ArcGIS10.4python.exe
  • at the top of the cookie_setup script set the project_directory to the location of the main input shapefile. For outlines, set the name of the input shapefile
  • Press F5 to run the setup script, creating the working directories and adding a new field to the shapefile
  • the next part needs to be performed manually (I haven’t had time to add in and test the Toolbox call)… add a new text field to the outlines attribute table called “split” and consecutively number each row from A1 to An (ie your last row). In QGIS the expression in the field calculator is
    concat(’A', @row_number )
  • save the file then use the ArcGIS Toolbox tool Analysis Tools->Extract->Split
  • use this to split the outlines shapefile based upon the “split” field you just created. Specify the “Target Workspace” as the “input” directory that has been created in your project directory
  • now load Cookie_Cutter into Spyder and again specify the following 5 inputs:
    project_directory : the project directory
    nextmap_dsm_img : the input DEM
    gp.cellSize : the DEM cellsize (in metres)
    tension_parameter : leave this as it is
    buffer_parameter : the distance to buffer your drumlins (in metres). The example shows 20m, for a 5m DEM
  • on line 66-68 you *might* need to change the path to the listed toolboxes. This is specified for 10.4 at the moment
  • RUN IT! The console pane in Spyder should show you a whole load of information as it processes each drumlin. There will be a counter showing you which drumlin you are on
  • The key output is the Volume_Master.dbf table. You can open this in excel. It is zonal stats from ArcGIS for each individual drumlin (subtracted from the cookie cut DEM). The critical value is the SUM column that shows the total height for all pixels within the drumlin. Multiply this by 25 (for a 5×5 pixel) to give you drumlin volume.

    UPDATE: If you can’t (or don’t want to) use Spyder you can just run the py script directly from the command line using the interpreter that ships with ArcGIS.

    Download