Showing posts with label palaeobiogeography. Show all posts
Showing posts with label palaeobiogeography. Show all posts

Saturday, December 13, 2008

How big is your species-area polygon?

Following on from my dino world post I have recently been trying to work out how to calculate the area of a species' (or other taxon's) range given a set of occurrences as latitudes and longitudes. In theory this is very simple: you draw a convex hull around your occurrences, split the resulting polygon into triangles, measure the area of each and sum the results. Simple, right?

Trouble is, when your coordinates are actually latitudes and longitudes things aren't as easy. Imagine this simple scenario:

Which polygon is largest, the blue or the red? On this projection they appear equal and this is because the distance, measured in degrees of latitude and longitude, between each set of points is exactly the same. However, although latitude is truly a measure of distance (one degree is 111km) longitude is not. At the equator one degree of longitude is equal in distance to one degree of latitude, but closer to the poles this distance declines to zero. This is because our polygon is really a spherical polygon.

How do we measure the area of a spherical polygon? Well, in the same way. we split it into spherical triangles and measure the area of these. However, to measure the area of a spherical triangle we need to know, not the lengths, but the angles (A, B and C, given in radians) as well as the radius (R) of our sphere:


So all we really need to do is work out those angles, but our data is latitudes and longitudes. More technically, we are providing the location of our polygon's vertices.

The easiest way to do this (Bevis and Cambareri 1987) is to artificially move each point to the pole, then the angle can be calculated as the difference between longitudes. However, this isn't quite as simple as it sounds as each angle can be measured twice, once for the 'interior' and once for the 'exterior'. So, for example, there may be 40 degrees of separation in one direction and 360 - 40 = 320 degrees in the other. The reason this confusion arises is that the sides of a spherical polygon are actually the sides of two spherical polygons, both an 'inside' and an 'outside'. (Both are finite, and hence, both are measurable).

Bevis and Cambareri (1987) suggest a way around this is to use an algorithm that measures the area based on the sequence the points are fed to it:

If the points are fed in clockwise order then the internal angles, and hence internal polygon (1) is calculated (shaded area, left-hand plot). If in anticlockwise order then the external polygon (2) is measured (shaded area, right-hand plot).

So how big is your species-area polygon? Well, if you really want to know you can calculate it using the Bevis and Cambareri method (I have put an R implementation on my website here).

Reference:

Bevis, M. and G. Cambareri, 1987. Computing the area of a spherical polygon of arbitrary shape. Mathematical Geology, 19, 335-346.

Sunday, December 07, 2008

Dino World

I am about to give a lecture on dinosaur palaeobiogeography here in Bristol and was tinkering with some data from the Paleobiology database (PBDB) and thought I'd upload the above image for your delectation.

The PBDB recently added two new data fields: palaeolatitude and palaeolongitude. I'm not entirely sure how these are done, but basically any fossil occurrence that has latitude and longitude data added also gets a palaeolatitude and palaeolongitude. Whilst preparing my talk I thought I'd stick up a world map with all of the dinosaur occurrences included on it, but decided to plot out the original positions too.

The above graph shows the modern location of each fossil locality (a light blue circle), it's original position (dark blue circle) and, so you can see how these link up, a red line connecting the two. The resulting image thus shows the 'tracks' along which the modern continents moved. (FYI: the graph was produced in R using the 'maps' library).

There are problems with this plot, however. There are three lines which are quite long and cross over other lines quite obtusely. The upper one of these (leading from the northeast of Russia to somewhere North of the Bering Strait is likely an artefact of drawing the plot on this particular projection. (In reality it should cross the Date Line and not wrap around the Earth in a whole different direction). The two others (the very southern line and the Japan-to-Atlantic line) are a bit harder to explain, but likely they are the result of some kind of error.

Still, I'm quite happy with it.

About Me

My photo
Currently I am founding member, president elect and entire membership of SWEMP (the Society of Wonky-Eyed Macroevolutionary Palaeobiologists). In my spare time I get paid to do research on very dead organisms and think about the really big questions in life, such as: What is the ultimate nature of reality? Why is there no room for free will in science? and What are the implications of having a wardrobe that consists entirely of hotpants?