Constructing Fiddler Range Maps, part 3: A Better Way?

This is the third of four planned posts about how I construct the range maps for fiddler crabs. The first part gave the history and background of how these maps were drawn in the first place. The second part discussed where the maps become problematic when we want to use them as input data for analysis. This part will present a possible solution to the problem detailed in the second part. The fourth and final part will step back and ask if we’re actually thinking about range maps the wrong way entirely.

As highlighted in part two, even beyond general questions of their accuracy there are some potential problems with using the range maps as data, particularly if we are thinking about estimating the sizes of their ranges. Three parts of the solution are completely obvious. First, for any question involving coastline length (whether to measure available space or estimate a fiddler range), one must be very specific about the map scale and background map used to make such measures since changing these could change the results. Second, when comparing species and/or regions, one must use the same base maps (optimally) or maps constructed from identical scales (suboptimal, but tolerable if necessary) to calculated values for each species or region. Third, species ranges and coastline lengths have to be determined from the identical maps if they are to be at all compared.

This last part is where the most work suddenly looms. As detailed in the previous post, currently our species ranges are generated from one map set while our coastlines are generated from a different one. To make them match, we would likely need to recreate the range data…again…on our new coastlines. Doing so highlights the fragility of the current process…but also leads to the realization that there is likely a better way to store the base information about fiddler crab ranges.

I’ve mentioned a few times that fiddler crab ranges should likely be viewed as one-dimensional lines rather than two-dimensional areas. But we can take advantage of areas and polygons to define a fiddler crab range in an easy and flexible manner. The idea here (which one can view as theoretical since I have not implemented it yet) is that for a given species we only need to define the general boundaries of the range—define a loose polygon which includes all of the within-range coastline and none of the outside-range coastline. Whenever we need to draw the actual range or estimate a distance, we then just need an algorithm which compares that polygon to a coastline map and extracts just the coastline inside the polygon.

There are a number of clear advantages to this approach.

  1. The range data is not fixed to a specific background coastline map, allowing any coastline map to be used to generate the actual mapped or measured range. Changing maps would not require redoing the range data.
  2. Updating the range data for a species simply requires updating the enclosing polygon, likely a vaster simpler operation in most cases than the current system.
  3. The polygon that describes the range data does not require tremendous precision over most of its boundaries. A simple rectangle might be adequate for many species (some will require more complicated shapes, unfortunately).

In theory, for some species with extreme simple ranges (a single contiguous coastline without any outlying islands), one could define the entire range by just noting the end points. In reality, we’ll likely define these by a simple shape that intersects the coast at those two points.

For example, below is a range map for Uca maracoani which I used in the first post of this series, with the addition of a blue rectangle to serve as the polygon denoting its “range.”

This rectangle adequately represents the range of the species, as long as we recognize that the range is the coastline within the rectangle and not the area of the rectangle itself. We need not concern ourselves with how far into the Atlantic the rectangle extends (as long as it isn’t so wide as to clip Africa), nor that it includes two landlocked countries without any shoreline. This rectangle would serve as the masking template for the species, to be applied to any coastline map. An algorithm would simply need to extract the coastline in the rectangle (marked in red) as needed for display or analytical purposes. If we need to change the range of the species we make the rectangle bigger or smaller or use a more complicated polygon as necessary (for example, we could not extend the rectangle west to encompass the Atlantic coast of Colombia and Panama without it intersecting the Pacific coast of Peru…in that case we’d have to use a slightly more complicated polygon that avoided intersecting the Pacific coast).

The biggest question mark about this approach is how complicated the computation will need to be to extract the correct coastline from a complex polygon of an arbitrary shape (simple polygons would be pretty easy), but my presumption is not too complicated. If nothing else, this problem is not unique and  has been solved in many other applications (e.g., masking or clipping figures using complex shapes in vector drawing programs such as Illustrator or Inkscape) so likely a workable solution already exists.

While not solving every problem, using this simpler bounding concept with algorithmic coastline extraction seems like a much more flexible manner of storing the range data. Of course, maybe the way we are thinking about range maps is completely wrong to begin with. Stay tuned for final thoughts…