Presentation is loading. Please wait.

Presentation is loading. Please wait.

William Perry U.S. Geological Survey Western Ecological Research Center Geography 375 Final Project May 22, 2013.

Similar presentations


Presentation on theme: "William Perry U.S. Geological Survey Western Ecological Research Center Geography 375 Final Project May 22, 2013."— Presentation transcript:

1 William Perry U.S. Geological Survey Western Ecological Research Center Geography 375 Final Project May 22, 2013

2 Background Background Rapidly growing field of landscape genetics in ecological research Rapidly growing field of landscape genetics in ecological research Promising approach using GIS visualization and analysis of genetic landscapes Promising approach using GIS visualization and analysis of genetic landscapes Allows users to map patterns of genetic divergence and diversity Allows users to map patterns of genetic divergence and diversity Need to automate a series of steps to create these genetic landscapes Need to automate a series of steps to create these genetic landscapes Python tool speeds up work and reduces error in complex, repetitive workflows Python tool speeds up work and reduces error in complex, repetitive workflows Script Output Python Script

3 Script Overview Script Overview Three Main Sections - Three Main Sections - 1.Read in species point data, create TIN edges with midpoints, join back to points to create composite key join back to points to create composite key 2. Read in file with genetic distance data, create composite key, join back to the species midpoints file 3. Create single species genetic surfaces

4 Input data Input data Species collection points Table with genetic distance values

5 Read in species point feature class. Read in species point feature class. Create TIN Create TIN Edit TIN to add in the species point information. Edit TIN to add in the species point information. Create TIN triangle polygons and TIN edges. Create TIN triangle polygons and TIN edges. Convert feature vertices to points from TIN edges. Convert feature vertices to points from TIN edges. Add XY coordinates to the Mid points of TIN edge. Add XY coordinates to the Mid points of TIN edge. Make Table view to do a spatial join between input points and TIN edge lines Make Table view to do a spatial join between input points and TIN edge lines Add field to store genetic distance data Add field to store genetic distance data Add fields to store unique composite key to start and end population names. Add fields to store unique composite key to start and end population names. Read in dbf file containing genetic data. Read in dbf file containing genetic data. Create composite key for start and end populations. Create composite key for start and end populations. Create genetic landscape surface using IDW interpolation. Create genetic landscape surface using IDW interpolation. Clip genetic landscape surface to study area grid. Clip genetic landscape surface to study area grid. Create Minimum, Maximum, AllNegative, Allpositive grids using Map Algebra. Create Minimum, Maximum, AllNegative, Allpositive grids using Map Algebra. Divide the species grid by the Maximum grid to get standardized grid. Divide the species grid by the Maximum grid to get standardized grid. Python Script Python Script

6 Script Info

7 Python Script Python Script Set the workspace Create variables for tool dialog

8 Python Script Python Script Create scratch geodatabase

9 Python Script Python Script Create TIN, edit TIN, create TIN edges, start, end and mid points Add XY coordinates to TIN midpoint file

10 Python Script Python Script Spatial join from TIN edge start points back to point features Spatial join from TIN edge end points back to point features

11 Python Script Python Script Add fields, create composite key Read in file with genetic distance values Add fields, create composite key

12 Python Script Python Script Write genetic values to species midpoints Create the genetic surface using IDW, clip to study area grid, then clip to TIN polygon tag file

13 Python Script Python Script Create grids needed for final output grid Create final standardized grid and grid with raw values

14 Files Created Files Created

15 Tool Dialog in ArcMap Tool Dialog in ArcMap

16 Tool runs successfully! Tool runs successfully!

17 Tool Output Tool Output

18 Obstacles Encountered Obstacles Encountered Exported python from ModelBuilder for code outline Exported python from ModelBuilder for code outline Numerous changes required to get tools to function in python Numerous changes required to get tools to function in python Changes in tool syntax between ArcGIS versions (Map Algebra) Changes in tool syntax between ArcGIS versions (Map Algebra) Excel files not supported in x64 version of python! Excel files not supported in x64 version of python! Additional troubleshooting required to run as tool in ArcGIS Additional troubleshooting required to run as tool in ArcGIS

19 Test script for 64 vs 32 bit python to read in Excel files Test script for 64 vs 32 bit python to read in Excel files Batch file to run 32 bit version of python Batch file to run 32 bit version of python

20 Future Enhancements Future Enhancements Add support for additional input formats (csv) Add support for additional input formats (csv) Finish polishing script and include with toolbox for distribution Finish polishing script and include with toolbox for distribution Customize script tool behavior using python validation Customize script tool behavior using python validation


Download ppt "William Perry U.S. Geological Survey Western Ecological Research Center Geography 375 Final Project May 22, 2013."

Similar presentations


Ads by Google