I ‘ ve been recently (GIS) helping Luis Mata and the Interdisciplinary Conservation Science Research Group of RMIT with the second phase of a very exciting project they are leading. The project is called ‘The little things that run the city’ and seeks to evaluate the diversity of insects that populate the City of Melbourne, the ecological functions and services they provide to society, and to assess the ecological processes that explain where the insects are found. On top of the scientific discoveries, the project seeks to get Melbournians interested in bugs, by showing how wonderful these little creatures are (with the most bizarre shapes and colours) and what important roles they play for us (e.g. pollinating our trees, decomposing organic matter, controlling pests, etc.).
Luís and colleagues have set a wide network of sampling plots (approx. 130 sites) across the green spaces within the city of Melbourne. They have sampled the insects within each of these plots several times over the course of an entire year, stratifying the surveys by habitat type (grassland, lawn, mid-story vegetation and trees). As part of the project we need to generate a shapefile that depicts the sampling plots and that indicate the species found in each sampling plot.
In this post you will learn how to generate a shapefile of sampling plots from point data using ArcGIS. The method I´ll show is not very sophisticated but it works well and it is very intuitive. It will allow you to generate hundreds of sampling points at once (no need to manually draw any polygon ;-o) and in an accurate and easy manner. I am sure this can be quickly done in R (using a very neat and short code, especially for handling the tabular data), as well as in other GIS software. But let´s focus here on how to do it using ArcGIS and a calculus spreadsheet.
Below is the data set we will use to generate the sampling plots. Basically each plot is a row in the table (identified with a unique Plot ID code). For each plot we know the coordinates of its North-East corner. When I received the data base I was also told whether the plots were square or rectangular, as well as the length of their East-West and North-South side, which differed in each of the green spaces sampled. In this case the plot size column alone was not very informative because the same area can be achieved with many different shapes (e.g. a circular plot centred at the E-N coordinates, a rectangle with different dimensions). For the case of the Westgate Park shown here as an example, the length of the E-W side was 10 m and the N-S side 10.4 m.
The first step will be to generate the coordinates of the three remaining corners of the plot. The projection of the data is GDA_1994_MGA_Zone_55 (this is UTM). This implies the units of the coordinates ‘E’ and ‘N’ are meters and therefore, we can calculate the coordinates of the other three corners by just subtracting the corresponding lengths of the plot sides, as indicated in the following figure:
We can easily calculate this for all plots using a calculus spreadsheet (very basic operation)
This is what we´ll get (note I´ve removed columns with information about the habitat type and plot area, because we don’t need them for this exercise).
Now we want to generate a shapefile in which each corner of each plot is an independent point. For this we will pile up the data of all coordinate pairs in just two X & Y columns, maintaining the information of the PLOT.ID to which they belong. We can do this by copy-pasting the columns to get something like the below. Once you have piled up the coordinates of the four corners, save the spreadsheet as a .csv file.
Now we will import the .csv file as a shapefile in ArcGIS, following what I´ve already explained in this post (search for Add XYdata! and remember to save the temporary shapefile as a permanent file. You also need to indicate the coordinate system of the data to import, in this case GDA_1994_MGA_Zone_55). I´ve called the shapefile ‘extreme_coordst.shp’. This is how it looks for the Westgate park (you can already see the shape of the plots!!)
In the final step, you will generate square/rectangular plots from the extreme coordinates using the tool ‘Minimum bounding geometry’. ArcToolBox > Data Management Tools > Features > Minimum bounding geometry
And voila! You layer of sampling plots is ready to use and share! This shapefile has a table of attributes with as many entries as sampling plots, identified by their unique PLOT.ID code. Once we receive the final data base of insects (number of records of each species found in each plot) we can add this information to the attribute table of the sampling plots (using the tools join/relate)…but we will see how this is done in a different blog post!