Thursday, April 28, 2016

Improvements to Sampling Grid Tools

A neat thing  happened this week.  A while back I created a new tool called Create Regular Sampling Grid and posted it online HERE . The tool is designed to help guide field workers in systematic grid around user-defined points. The tool is useful for validating coarse-resolution imagery, such as Landsat or MODIS, or for sampling systematically within polygons. Earlier this week I got a message from Duncan Hornby, a long time ArcGIS programmer from the UK, with a slew of awesome suggestions for ways to improve this tool.  His suggestions ended up dramatically improving the speed and user interface of the Create Regular Sampling Grid Tool resulting in version 2.  The lesson that I learned is that good things can happen with a second pair of eyes, and posting code online is a great idea.  I also learned a fair bit about improving the user experience and anticipating and troubleshooting potential problems.  Thanks Duncan.


Friday, April 22, 2016

Consider Thiessen polygons as an alternative to heat maps

Recently a colleague asked me to make a heat map for her animal trapping results. I agreed, but then quickly realized that the task was more difficult than it first seemed. In this particular case the individual trapping stations were only 10 meters apart and the distance among trapping grids was 500 meters. It struck me as inappropriate to try to interpolate across such a long distance when the variability within a grid was so great. I wasn't really a fan of just displaying the points either. Somehow they just came across looking messy and imprecise. The solution that I came up with was Thiessen polygons. This is probably the simplest form of interpolation, yet it is extremely powerful visually. In the resulting maps you are still able to see the fine-scale detail of individual trapping locations yet still make out the broad-scale patterns. In this map I've left off the legend to maintain the anonymity for the person that I made the map for. I think that it pretty clearly illustrates the point that I'm trying to make.

Another nice feature of Thiessen polygons is that they are an exact interpolator. That means that the model produces the exact value at the location of the data point. This is not the case with the majority of interpolators, including kriging.

Lesson: if considering heat maps or interpolation look into Thiessen polygons first. It may be the simplest yet best tool for the job.

Friday, April 15, 2016

Random forest and ArcScan

Recently I've been helping some colleagues in my department convert some historical maps into contour lines.  They are at the stage of using ArcScan to convert old scanned topographic maps into contour lines. Interestingly, ArcScan doesn't make use of multi-band image files, but rather single-band grayscale images. When trying to pull out contour lines as distinct from other types of lines this became problematic. Using a simple band thresholding method browns and grays tended to get confused.

The solution?  I used the Marine Geospatial Ecology Tools to perform a random forest classification to separate brown lines from all other colored lines. The results were really impressive.  Pretty much all of the gray lines were removed.  See the picture below for an illustration of the result.

Original scanned topographic map with contour lines in brown and other lines in black/gray.
The result when using a simple band thresholding approach. Black lines represent cells that will be used in the vectorization process.
The result from the random forest classification plus a small amount of speckle removal using the regiongroup tool in ArcGIS.

Thursday, April 7, 2016

Historical ecology of the San Joaquin River Delta

I was having a discussion with a colleague recently and got reminded of some of the historical ecology work that has taken place in California.  Robin Grossinger's historical ecology group at the San Francisco Estuary Institute does excellent detective work.  Their work results in maps of how landscapes have changed over the past one hundred years or more and is changing how land managers actively manage lands and species.  Kudos to Robin Grossinger, Allison Whipple, Erin Beller and other historical ecologists at the San Francisco Estuary Institute for a job well done, for affecting positive change on land management practices and ecosystem restoration, and for elevating the role of historical ecology!

http://www.npr.org/2012/10/07/162393931/restore-california-delta-to-what-exactly