140 likes | 267 Vues
This project aims to enhance the workflow at the California Natural Diversity Database (CNDDB) by automating data processing tasks using Python scripts. Key tasks include selecting unbuffered new records, appending buffer results, and marking records as processed with updated field values. By creating a new field for tracking buffer status, the workflow is streamlined when incorporating new data. This automation alleviates time-consuming manual processes, thus improving efficiency in mapping rare plants and animals for California's natural heritage program.
E N D
Annie Chang Improving workflow at CNDDB
California Natural Diversity Database • Natural heritage program • Map rare plants and animals • http://www.dfg.ca.gov/biogeodata/cnddb/
Purpose • Automate part of the workflow using python script
Select by attributes • Needed to select new records that are not yet buffered (Source_Feature = N)
Append • Each time the script runs, the buffer feature class would be deleted and recreated • Save the results of the buffer in the feature class SOURCE_FEATURE through append
Calculate Field • Needed to mark the records as processed • Values of Source_Feature were changed from “N” to “Y”
Dissolve • Occurrences are summaries of detection areas for particular species
Obstacles • When to put single, double, or no quotes around variables • Text values for the CalculateField operation needed double quotes
Obstacles (continued) • Originally, the buffer was done on the entire source layer. Then, I realized if I were to add additional records to the source layer (like when we receive new data at CNDDB), there is no way to only buffer the new data. I added a new field “Source_Feature” that had values “Y” or “N” to indicate whether this record has already been buffered and saved in the SOURCE_FEATURE feature class.