| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Documentation_speciesmappingtools

Page history last edited by yichuan.shi 12 years, 9 months ago

Speciesmappingtools v110427

(For ArcGIS 10 ONLY)

 

Models and scripts for species data processing

 

This folder contains:

  • a  toolbox 1. IUCN species mapping tools (to be added to the Toolbox list in ArcMap and ArcCatalog)
  • subfolder scripts with the scripts that can be access through the toolbox
  • subfolder ToolData with

o   the basemap (world country boundaries shapefile – country1mVMAP_un2008_MP.shp), (this might be missing if the toolset is sent by zipped file over email as it is large – please then contact the GIS Manager to obtain a boundaries shapefile if you don’t have one)

o   template_RL.shp which is used to define the attribute fields in new shapefiles created in the tool createEmptySpeciesShapefile model

o   and any other data required by the scripts and models.  (Other layers may be required to digitise new species shapefiles).

  • subfolder output for output data (this sometimes has test files sitting in it which you can delete.)

 

The custom written models/scripts available are:

 

1. Create Empty Species Shapefile (model)

1b. Create Empty Species Shapefiles from List (createEmptyShapefilesFromList.py)

2. Add Attribute Files (addAttributeFields93.py)

3. Fill Binomial Field with shapefile name (Sci_Name_as_polygon_name.py)

4. Check Fields (checkFields.py)

5. Set Geog Projection to WGS84 (BatchSetProj_WGS84.py)

6. Fill Legend Field (getLegendField.py)

7. Clip workspace to Coast (clipWorkspaceToCoast.py)

8. Species Richness Count (speciesRichnessCount.py)

9. Split Layer By Speciesname (fixed for ArcGIS 10)

 

 

Some custom scripts are now available as batch scripts as well (b versions).  Another way of running in batch is to rightclick the tool and choose ‘batch’ – then more than one input file can be added.

 

Other tools in the toolbox are Append, Merge, Create Fishnet, Minimum Bounding Geometry, which are simple copies of the standard ArcGIS tools with documentation available on the ArcGIS website.

Append: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1825&pid=1824&topicname=Append_%28Data_Management%29

Merge: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1829&pid=1824&topicname=Merge_%28Data_Management%29

Create Fishnet: Creates a fishnet of rectangular cells. The output can be polyline or polygon features

Minimum bounding geometry: Creates a feature class containing polygons which represent a specified minimum bounding geometry enclosing each input feature or each group of input features.

 

Instructions for use:

 

1. Copy the folder speciesmapping tools to its new location. Relative pathnames are used so as long as the folder structure remains the same it does not matter where it is located.

2. Open ArcCatalog making sure that no other copies of ArcCatalog or ArcMap are open at the same time on your computer.

3. Add the toolbox in ArcCatalog by – Rightclick in tool window – Add toolbox -  navigate to folder and add  1. IUCN Species Mapping Tools. 

4. Close ArcCatalog immediately to ensure that changes are saved, then open either ArcCatalog again or ArcMap as required.

3. If  the scripts will not run, check the properties – source code to check that the scripts have been located correctly .  Right Click on the script and see what location it is looking for the script in.

4. Open the Command Line window so it is visible in ArcMap/ArcCatalog when running so that you can read messages.

5. Load the basemap plus any other layers you require for digitising into an ArcMap project.  For those in the Cambridge IUCN office, there is a project on J: called thedefinitivecountryboundaryFeb2010.mxd  which can be used as a template.

 

 

Contents of toolbox:

Name

Type

Model/Script function

Progress/Comments

1.createEmptySpeciesShapefile

 

Model

Create empty species shapefile  in arcmap, with all attribute fields.

 

Can change the attribute fields added to the empty new shapefile by changing the template file used by the model.

 

After created – Editor – Start Editing – Task: Create New Feature – Target: Set Target Layer.  Then afterwards, Stop Editing, Save Edits.

 

Best to run  in ArcMap so user can immediately add polygon data.

 

24 Mar 2010: updated to change output folder to a parameter the user can choose.

 

 

2. addAttributeFields

 

Script

Checks a shapefile and  adds any missing attribute fields from the shapefile.

Script has to be run without arcmap open with the shapefile in it, otherwise get schema lock error.

3. 3. Fill Binomial Field with shapefile name (Sci_name_as_polygon_name.py)

Script

Fills in Sci_name field with the shapefile name (species name).

 

First letter is capitalised and underscore is replaced with space.

 

4. checkFields

Script

Check that required fields are not blank

This script checks for the presence of the required fields BINOMIAL, PRESENCE, ORIGIN and CITATION, and checks that all records have data in those fields.

 

The information messages are given in the command line box, above the error message which is given if any of the fields are not present or full.

5. BatchSetProj_WGS84

Script

Sets the projection to Geographic WGS84 of multiple shapefiles

If the projection is already set to something different, it changes it.

6. getLegendField

Script

Calculates the legend field from the Presence, Origin and Seasonality fields.

 

7. Clip Workspace to Coast

Script

 

 

8. Species Richness Count

Script

 

 

9. Split Layer By Speciesname

Script

 

 

 

Issues to be aware of:

 

Schema Lock Error: http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Rules_for_working_with_schema_locks

 

Cannot run a script that adds or changes fields if they are being accessed by another application or script. 

 

S O’Hanlon updated 28/4/10

Yichuan SHI updated 27/04/11

 

 

Comments (0)

You don't have permission to comment on this page.