Tuesday, 30 September 2014

Municipality summaries practical 2


In today's practical you will continue with the GIS work you started last week. You will calculate the size (area) of the formal terrestrial protected areas and vegetation types 2006 and 2009 in the shape files you created last week.

You can calculated the forest patch, FEPA wetlands and river FEPA areas as well but you must complete the PA and vegetation types areas.

We will also calculate the threat (ecosystem or conservation) status for your municipality's vegetation types which means you will need land cover to clip out the remaining natural vegetation - remember the vegetation map you clipped to produce your municipality's vegetation types contains the original extents of the vegetation types in South Africa. Lesotho and Swaziland before the large scale land use changes of the modern era.

Download QGIS

Before we do anything more  download QGIS and install it - we will use this software for projecting the shape files. You can download the installation file for QGIS from a local server below. Install it on the machine you are working on. Do this first as it takes a while to install. Don't install any of the sample data to save time.

This is freeware so you are welcome to install it on your own computer. i will only explain how use QGIS for projecting your shape files today but you are welcome to do the entire practical using it. I will explain how to do most of the practical in ArcView 3.2 however.

Once it has started to install continue reading what you will be doing today.

Download QGIS

Projecting shape files to Albers Equal Area projection so that area can be calculated.  

The shape files you created last week are not projected they are in geographic- you cannot use these to calculate area, I will explain in class. We are going to use the Alber's Equal Area projection for South Africa for calculating area as it allows comparison across the country and is not too complicated. 

The zipped file below contains the SA municipalities shape in the correct Alber's projection.  

  • Unzip the SA municipalities albers and open it in QGIS by going to "Add vector layer" under the Layers tab 
  • Once it has opened right click on this layer in the layer list and set the project CRS from this layer. 
  • Now save a custom CRS by going to "Setting custom CRS"  under the Settings tab and add a new CRS by copying it as an existing CDS and give it a name so that you can reference it from now on when projecting your other shape files. 
  • In the Project Properties box under the Project tab enable "on the fly" projection under CRS menu item 
  • Open all the shape files you must project i.e. your municipality's protected areas, vegetation types and forest patches. 
  • Change these to the new projection by right clicking on each layer and choosing "save as". add the new shape file name and location and choose the new custom CRS you just created. Make sure it looks like this before saving. 

  +proj=aea +lat_1=-33 +lat_2=-24 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs

Go to the new shape file and open the .prj file QGIS created in Notepad and check that it looks like this   


Well done! you can now safely calculate the area of your municipaliy's  vegetation types and protected areas. We will use ArcView 3.2 to do this. 

Adding areas to the municipality's vegetation types and protected areas shape files   

  • Add the projected vegetation types and  protected areas shape files as themes in ar4cView 3.2.
  • Open the attribute table of the shape file to which you want to add an area field/column
  • Choose "Start editing" under the Table tab
  • "Add a field" under the Edit tab, make sure the field is of type number with 2 decimal places and name it "origarea" for the original extents area of your vegetation type
  • Click on the new field column heading, then choose "Calculate" under the Field tab and enter the following
    [shape].ReturnArea/10000. This will populate the new column with the areas of that collection of polygons in hectares there are 10000 square metres in a hectare. 
  • Add a new field and use the field calculator to calculate the % area of you municipality which was originally covered by this vegetation type. This will look something like [orinarea]/<the are of your municipality*100. Note you MUST use the field called AreaAlbers I included in the SA municipalities albers shape file downloaded today. The area on the BGIS website for municipalities is out of date and the updated summaries are being poblished this year. Some municipalities have changed in size due to municipal boundary changes by the Demarcation Board since these summaries were published.

Calculating the area of the remaining  extents of the municipal vegetation types

You have to clip the vegetation types layer with a land cover layer which shows what is still natural and not transformed to other land uses e.g. forestry or agriculture.  We will use the national land cover 2009 rater grid available on BGIS. Download the raster grid, unzip it and open it in ArcView. Note you will have to enable the Spatial Analyst extension in order to be able to see this layer. 
open the attribute table and take note of which gridcodes are classed as natural.

In order to clip the vegetation by these two classes we must first vectorize the raster grid to a shape file. As this take a long time to compute I have done so for you.  

  • Add the land cover shape and the SA municipalities Albers to an Arcview. Both of these are in the Alber's projection and should be visible when opened together along which your other projected files you have made.. 
  • First clip the land cover shape by your municipal boundary as you did last week by selecting your municipality and clipping the land cover to a new shape file of your municipality's land cover. 
  • Select the "natural" gridcodes in your municipality's land cover by using the query tool 
  • Now clip to a new shape file of your municipality vegetation types in Albers which contains the original extents area calculations by the selected gridcodes of the municipality's landcover. The result is is the remaining extents of the vegetation types of your municipality.
  • You will need to dissolve the remaining extent vegetation types shape file on Bookcode as the clipping will have added numerous separate new polygons.   
  • You can now add a field called "remarea" to its attribute table and calculate the area of the remaining extents
  • Calculate the percentage of the original extent of the vegetation type which is still remaining. [remarea]/[origarea]*100     
  • Use the BGIS website to find out the cut off points for classifying a vegetation type as Vulnerable, Endangered and Critically endangered. Add a field called ThreatStatus and classify each vegetation type as Least Threatened, Vulnerable, Endangered and Critically Endangered.
  • Make a map showing your municipality's vegetation types threat status with the correct colours used in the legend. Check on BGIS to see what these colours are.


Tuesday, 23 September 2014

Municipality summaries practical 1


In this practical you will create summaries of various biodiversity related features for your chosen municipality similar and updated to those found on the BGIS website which were produced from data available in 2009. They are currently being updated you are going to "jump the gun" as it were.

First you will need the South Africa's municipal boundaries. For now we are going to stay with the 2009 boundaries so that you can compare your findings with those on the BGIS website.

Download the zipped 2009 boundaries

On the BGIS website find and download the following zipped shapes of biodiversity related feature

The most up to date protected areas layer - read carefully!
National vegetation types 2006
National vegetation types 2009 - you need to log in
National Fresh Water Priority Area - wetlands
NFEPA - river FEPAs
Forest patches - download the shapefile here

We will used Arcview 3.1 which is installed on the machines in the lab you will have to do the following. I am not going give all click by click steps here you will learn in class.

1. Unzip all the shape files in a working directory which should be near the root and have not spaces e.g. c:/bdc332/
2. Open and look at all the layers in Arcview 3.1
3. Select your municipality using the select tool, find, query builder tool or attribute table.
4. Clip all the biodiversity related features to your now selected municipality. To clip  you will have to see that the geoprocessing extension is enabled. The geoprocessing tool can be found under view. Save the new clipped biodiversity related feature layers into a directory where you can find them again.

4. You can now produce a lists of the following
a. Protected Areas
b. Vegetation types 2006
c. Vegetation types 2009
d. Biomes 2006 - this can be created from the vegetation types
e. Forest types - look at the metadata!

First view the attribute tables for your new shapes - sort these. Notice that there are duplicates which are caused where there is more than one polygon belonging to the same protected area or vegetation type i.e. the feature has more than one piece which are not linked e.g. Table Mountain National Park. This may in some cases not be a problem.

You can reduce the entries in the attribute table to a single entry by using the dissolve geoprocessing tool to produce yet another shape file.  Choose the fields you want to keep carefully and experiment.

Pleae be aware that "a shapefile" is a collection of several even up to 7 files all with the same name but different extentions. You can view the .dbf which is the attribute table file also in excel but you can't save it so you can't break it.

5. Make a new layer of the following from the two remaining clipped biodiversity related features
a. All wetlands with a FEPA status of FEPA from the NFEPA wetlands clipped layer
b. All subquaternary catchments with the FEPA status of  FEPA from the NFEPA river FEPA clipped layer. What other FEPA status can a subquaternary catchment have?

To create these new layers you can use the select tool and save the selected features to a new shape file.

Confused by all the FEPA!
If you are confused join the club it took me a while to get my head around this one! I will try my best to explain this in class but to start please notice the projects name is NFEPA National Freshwater Ecosystem Priorities Areas. A wetland or a section of a river and its adjacent  subquaternary catchment were assigned the status of a Fresh Water Priority Area FEPA if they met certain criteria. Some rivers were not quite good enough to achieve the status of FEPA but still important for certain indigenous fish species in which case their FEPA status is Fish Sanctuary. What others did you find.    

6. You should finish the practical with 7 layers saved as shapefiles
5 from point 4 above the dbf's of which can to created lists of the related biodiversity features
2 from point 5 above which now only contain the wetlands or subquaternary catchemnts with a FEPA status of  FEPA

Monday, 8 September 2014

Conservation Planning Blog Assignment

Choosing a municipality for your conservation planning blog assignment 

You must all do your assignment on a different municipality so please book the municipality of your choice by adding a comment to this page giving you name student number and the municipality you wish to book. You must, however, use a gmail account to leave a comment.

The selection will work on a first come first served basis so book your choice asap.I will check the blog several time a day and indicate which municipalities are already booked taken and by whom so that there are not too many comments to check in order to find a free municipality. Always also check the comment as well to make sure your choice is indeed available.

Note your assignment must be on one of the municipalities on the list below as these have been check to see the all the relevant information which you need to complete your assignment is available.

Province Municipality name Cat B code Student name  Student no
Western cape City of Cape Town CPT  not available not available
Western cape Beaufort West WC053 
Western cape Laingsburg WC051
Western cape Prince Albert WC052 
Western cape Bergriver WC013
Western cape Breede Valley WC025 
Western cape Hessequa WC042 
Western cape Matzikama WC011 
Western cape Saldanha Bay WC014 
Western cape Witzenberg WC022 
Western cape Bitou WC047
Western cape George WC044
Western cape Knysna WC048
Western cape Kannaland WC041 
Western cape Oudtshoorn WC045
Western cape Cape Agulhas WC033 
Western cape Overstrand WC032
Western cape Swellendam WC034  not available not available
Eastern Cape Kouga  EC108
Eastern Cape Kou-Kamma  EC109
Eastern Cape Blue Crane Route EC102
Eastern Cape Ndlambe  EC105
Eastern Cape Ikwezi  EC103
Eastern Cape Sundays River Valley EC106
Northern Cape Kamiesberg NC064 
Northern Cape Richtersveld NC061