Presentation is loading. Please wait.

Presentation is loading. Please wait.

Improving Georeferencing Workflow with Python

Similar presentations


Presentation on theme: "Improving Georeferencing Workflow with Python"— Presentation transcript:

1 Improving Georeferencing Workflow with Python
GEOG 375 Final Project Tammy Dong

2 Purpose Automate data processing involved with georeferencing data from the Consortium of California Herbaria Separate “bad” data to be processed and checked manually Create point and error radius shapefiles of the “good data”

3 Consortium Data Comes in a table with various information
Table needs to be cleaned up in excel and ArcMap to prevent errors lat/long, datum, error radius field will be the focus of this script

4 Import modules and set datapaths
This is where data that needs to be manually processed go

5 Part 1: Separate Data Based on Datum
-Each entry has a unique datum - some datums are blank (unknown) -in order to process them, must separate

6 Part 1: Separate Data Based on Datum
Create table view for search cursor Use Search Cursor to access table in order to loop through rows for the Select By Attribute Routine. Query tells Select By Attribute routine to select by unique datum in datum field If-then statement names output tables by datum and blank entry as unknown Copy Rows saves tables for each datum selection

7 Part 1: Separate Data Based on Datum
Output tables: Note the inconsistent datum field resulted in “WGS84” and “WGS 84” table. This will be addressed later.

8 Part 2: Separate Data Further by Coordinate Precision
-Sometimes the data collector unintentionally rounds or truncates coordinate points -Truncation/low precision leads to less accurate localities -For this project, defined as 3 decimal places or less

9 Part 2: Separate Data Further by Coordinate Precision
Add field routine to create new fields Loop interates through new fields to give them values using update cursor Create Loop to iterate through tables with known datums add 3 fields, 1 will be for the buffer later, the other 2 will contain corresponding lat/long data as text this will make the subsequent query possible

10 Part 2: Separate Data Further by Coordinate Precision
Create table view for search cursor Use Search Cursor to access table in order to loop through rows for the Select By Attribute Routine. Query tells Select By Attribute routine to select truncated coordinates from lat/long text field previously created Copy Rows exports selected truncated data to manual folder Switch selection and export via copy rows to display folder (tables to be converted to shapefile)

11 Part 2: Separate Data Further by Coordinate Precision
Output table results:

12 Part 3: Convert non-truncated data to shapefiles
Loop through tables in folder If-Elif statements sets spatial reference based on file name to be used for Make XY Event routine fnmatch module sees if “table” matches a string. Wild card values are used to account for possible spaces in between name and date such as the “WGS84” and “WGS 84” mentioned previously Make XY Event displays table as points at lat/long input Copy Features saves event layer

13 Part 3: Convert non-truncated data to shapefiles
Results:

14 Part 4: Project shapefiles to Teale Albers
Loop through tables in folder fnmatch module is used again to match file name to transformation needed for Projecting Project management is used to project shapefiles

15 Part 5: Merge and buffer Input: points projected in teale albers.
List Features creates List of shapefiles Merge tool merges all shapefiles in list Buffer analysis tool uses previously created merged shapefile

16 Part 5: Merge and buffer Results: merged shapefile Buffer error radius

17 All Data Results Optional: Delete unwanted intermediate data


Download ppt "Improving Georeferencing Workflow with Python"

Similar presentations


Ads by Google