
An introduction to the course from the course instructor.
In this course we will use PyScripter as our Python IDE but you can use the IDE of your own choice. See text document from Resources for more information on PyScripter
Tips for getting the most out of this course. See communites.txt in the Resources for information on joining geospatial GIS communities.
In this video we will get the 21-Day Trial of ArcGIS Pro. This is not necessary if you already have access to ArcGIS Pro. Download the arcgispro_trial.txt from the Resources for the link.
In this video we will install PyScripter and enable the use of the arcpy module. Download the install_pyscripter.txt file from Resources for the link. You do not need to use PyScripter, you can use an IDE of choice. I recommend avoiding IDLE as the AddMessage() function will not work, you can replace AddMessage() with print().
In this video we will look at different ways to use Python Tools with ArcPy and the convention that this course will use.
Enviroment Setting control aspects of the outputs from Geoprocessing tools
After running a geoprocessing tool in ArcGIS Pro you can copy the Python used to run the tool from ArcGIS Pro into a script.
The arcpy.AddMessage function allows you to write a message that will appear on a tool dialogue box in ArcGIS Pro. The Message is also output when a script is run in a Python Interpreter.
Writing geoprocessing outputs to memory is often significantly faster than writing to disk. Data written to the memory workspace is temporary and is deleted once the application (script) is closed. It is great for writing intermediate data created in Python scripts that are not required as an output but are important steps in getting to the desired output.
The advantage of a Result object is that you can maintain information about the execution of tools, including messages, parameters (inputs), and output. These results can be maintained even after several other tools have been run.
Return a list of workspaces from a current workspace.
Return a list of datasets in the current workspace (geodatabase/gdb)
List Feature Classes in a Workspace
Return a list of tables in the current workspace
Return a list of raster datasets in the current workspace.
Return a list of field objects in a feature class, shapefile, or table.
Return a list of files in the current workspace.
Returns a list of the index objects in a feature class, shapefile, or table in a dataset.
We will build up this tool throughout the course. Eventually, the data catalogue will be saved to excel with various column headers describing the data. For now we will simply use arcpy.da.Walk to to print out every dataset name and path. We are only interested in data that sits in our standardised data structures in our File Geodatbases as a Feature Class, Table, or Raster.
Describe a data element and return a Describe object with multiple properties. The properties are dynamic, meaning that depending on the data type described, different describe properties will be available for use.
Shapefile description contains the general description object properties along with Feature Class, Table, and Dataset properties.
Feature Class description contains the general description properties along with Feature Class, Table, and Dataset properties.
Description contains the general description properties Workspace properties.
Description contains the general description properties and Dataset properties.
Describe contains the general description properties and raster dataset band properties.
Describe contains the general description properties and for feature class, table, dataset, and layer.
Returns a dictionary with properties as key, value pairs decribing the data. This is different than arcpy.Describe() which returns a describe object.
We will build up this tool throughout the course. Eventually, the data catalogue will be saved to excel with various column headers describing the data. For now we will simply use arcpy.da.Walk to to print out every dataset in our geodatabases and list several properties using the arcpy.Describe().
We are only interested in data that sits in our standardised data structures in our File Geodatbases as a Feature Class, Table, or Raster
Create a file geodatabase in a folder. In this video we will create a File Geodatabase named WIP_PRJ_ProjectData.gdb. We will use this gdb throughout the rest of the course.
Creates an empty feature dataset in an existing geodatabase. In this video we will create a Feature Dataset in the WIP_PRJ_ProjectData.gdb created in the Create File Geodatabase (Data Management) video.
Create an empty feature class in a geodatabase or a shapefile in a folder.
Create a folder in the specified directory. In this video we will create a folder named Live_Projects in our ArcPy101 directory.
We will build up this tool throughout the course. The end product will be the ability to rapidly deploy new projects by creating the necessary folder and data structures. This script will evolve and by the end of the course we will use an Excel spreadsheet to devise a project setup.
In this video we will use a dictionary and a list to create the setup.
Creates a domain in a geodatabase. In this video we will look at creating a text and short coded domain along with a range domain in our WIP_PRJ_ProjectData.gdb
Add a value to a domain's coded value list. In this video we will add coded values to our Main_Client text domain and Project_Type short domain.
Alter a domain name, description, and split and merge policies.
In this video we will alter the Main_Client and Project_Type domains.
Sort the code or description of a coded value domain in either ascending or descending order. In this video we will sort the Project_Client and Project_Type domains.
Remove a value from a coded value domain. In this video we will remove a code entry from our Project_Client and Project_Type domains.
Set the minimum and maximum values for an existing Range domain. In this video we will set the range values for our GIS_Hours range domain.
Creates a table from an attribute domain. In this video we will export our Project_Client domain to a File Geodatabase Table.
Create or update a coded value domain with values from a table. In this video we will update our Project_Client domain, show the error that occurs when a coded value already exists, and that you can use this tool to create a new coded domain from a table.
Delete a domain from a workspace. In this video we will delete the Project_Client_2 domain created in the Table To Domain (Data Management) video.
The field object represents the description of a column in a table such as the name, type, and if it is editable for examples. In this video we will look at the properties associated with a field object.
Adds a new field to a table, feature class, feature layer, or raster, that contain a table. In this video we will add fields to or UDEMY_PRJ_SiteLocations_Pt feature class using required parameters only and to our UDEMY_PRJ_LinearProjects_Ln feature class using optional parameters.
Adds a new fields to a table, feature class, feature layer, or raster, that contain a table. In this video we will add multiple fields at once to our UDEMY_PRJ_ProjectExtents_Ply feature class.
Update a selection of field properties such as name, alias and length.
Deletes one or more fields from a table, feature class, feature layer, or raster dataset. In this video we will delete fields from our UDEMY_PRJ_ProjectExtents_Ply feature class.
Provides field info methods and properties for layer and table views.
Define the field in the input table or feature class that stores the subtype codes. In this video we will set the project_category field as the subtype field in our UDEMY_PRJ_LinearProjects_Ln feature class.
Add a new subtype to the subtypes in the input table.
Set the default value or code for the input table's subtype. In this video we will set the default subtype for our UDEMY_PRJ_LinearProjects_Ln feature class.
Remove a subtype from the input table using its code. In this video we ill remove a subtype code from our UDEMY_PRJ_LinearProjects_Ln feature class.
Returns a list of domain objects from a geodatabase. In this video we will return domain objects from our WIP_PRJ_ProjectData.gdb and look at the domain object properties that can be accessed.
Returns a dictionary of the subtypes for a table or feature class. In this video we will return the subtype dictionary for our subtype field in the UDEMY_PRJ_LinearProjects_Ln feature class.
Remove an attribute domain association from a feature class or table field. In this video we will remove the domain associated with the project_type field in the UDEMY_PRJ_LinearProjects_Ln feature class.
Set the domain for a particular field. In this video we will undo what we did in the previous video and assign the Project_Type domain to the project_type field in our UDEMY_PRJ_LinearProjects_Ln feature class.
Create a default value for a field. When a new record/row is added to a table the default value will automatically be populated for that field. In this video we will assign a default value to a text and float field and also look at clearing a default value setting.
The InsertCursor provides write access to add new records to a feature class or table. Attribute values and geometry are added using a tuple. The order of values in the tuples represents the order of the fields supplied in the field_names parameter. In this video we will add records to our UDEMY_PRJ_LinearProjects_Ln feature class.
The SearchCursor provides read-only access to the records of a feature class or table as an iterator of tuples. The order of values in the tuples represents the order of the fields supplied in the field_names parameter. The SearchCursor can be iterated using a for loop. Using the with statement aids in removal of locks and can be used in tandem with del to avoid locks. In this video we will retreive data from our UDEMY_PRJ_LinearProjects_Ln feature class.
The UpdateCursor provides read-write access to the records of a feature class or table as an iterator of lists. The order of values in the lists represents the order of the fields supplied in the field_names parameter. The UpdateCursor can be iterated using a for loop. Using the with statement aids in removal of locks and can be used in tandem with del to avoid locks. In this video we will use the Update Cursor to update records in our UDEMY_PRJ_LinearProjects_Ln feature class.
NOTE: Videos are currently being updated. You will notice a cut off between newer videos and the older. Dont worry, the content is the same and the older videos are still relevant. Re-doing with better editing.
Want to stand out from the crowd? A little code goes a long way! Gaining an understanding of ArcPy and how to apply automation with regards to geospatial data management, data manipulation, and analysis via Geoprocessing tools will aid with standing out from the crowd and get you noticed. ArcPy is in high-demand, so up-skill today and put yourself in this high-demand category.
ArcPy is a fantastic ally for all your daily ArcGIS Pro tasks. This course will initially focus on using ArcPy for data management. Data management is often one of the most overlooked aspects of GIS and unfortunately can be the difference between a good GIS and a bad one. Good data practices open up the door for even better automation.
Lists are a big factor in ArcPy workings. You will look at creating lists of various objects such as workspaces, feature classes, and fields for examples, and perform actions on different elements. You will look at using ArcPy to describe the various elements and use lists and descriptions to generate a comprehensive data catalogue.
Adding to the data management side, the course slides into data validation rules with domains and subtypes. Domains are used to constrain the value allowed for a particular field. Basically, they enforce data integrity. You will look at the whole suite of tools available for domains, from creating and altering, to applying to a field. Subtypes are used to categorize your data. Think of a road network, you can categorize roads into primary, secondary, and tertiary roads for example. You can set defaults values on fields in each subtype category that is automatically applied when creating a new feature. Subtypes can be used in tandem with domains to improve data integrity.
No we're getting into the heart of things. ArcPy is a great tool for creating templates and standardising your data structures. You will create a file geodatabase, a feature dataset, and a set of feature classes, all using ArcPy. We will take you through adding fields and take a look at a long list of tools associated with fields, from the Field Object itself, to creating a field (Add Field), altering a field, assign a default, field calculations, and mapping fields from one tool to another.
There's no getting away from Excel in today's GIS society. This course will embrace that fact here and look at some conversion tools; Table to Excel, Excel to Table, and the Export Table that allows a more diverse choice such as a CSV. You will create a point dataset from an Excel file and save it to memory showcasing several tools that get the job done. ArcPy offers an array of data conversion tools.
I'd like to say that cursors are the main event but that would be doing the rest of the material a huge injustice. Cursors will rapidly become a daily routine in your ArcPy life. Cursors are used to read and write attributes and geometries. You can use the Search Cursor to read through a dataset, the Update Cursor to update attributes and geometries, and the Insert Cursor to add new records.
ArcPy boasts a host of general data tools to aid with data management, processing, and workflows. We will dive into them and perform checks; such as whether a dataset or data structure exists, testing for a schema lock; this is often the crux of geoprocessing that the data is locked, join datasets based on a common field, merge and append data.
Where would we be without the analysis tools provided by ArcGIS Pro? What about everyone's ultimate favourite tool, the Buffer? Well, we can use ArcPy for that too, and many more. ArcPy provides the bed for repeatable geospatial analysis through automation.
Selecting data with ArcPy enables you to perform geoprocessing tasks on the subset. The most notorious are Select Layer by Attribute and Select Layer by Location, but there are others patiently waiting their turn to be called into an ArcPy script.
Finally, you will create a custom ArcTool for use in ArcGIS Pro as a GUI and chain geoprocessing tasks to achieve a desired output.
This course uses PyScripter to write the Python code. You can use any code editor software that you prefer. The course solely focusses on ArcPy and no other third-party modules are utilized.
The ArcPy for Data Management and Geoprocessing with ArcGIS Pro course requires a Basic license for ArcGIS Pro. Only tools and workflows that can be performed at the basic license level are used and assessed during the course.
Please Note! ArcGIS Pro requires a license to use which is a paid license. You can get a 21-day free trial, or you can get a Personal Use license for a fraction of a Commercial license.
It is recommended to get the free trial if you have no other access to ArcGIS Pro software.
Your course instructor, Glen Bambrick, has over 16 years' experience with GIS and geospatial data, with over half of those years utilizing ArcPy on major projects to standardize and automate workflows.
By the end of this course... you will be fully armed with the fundamentals of ArcPy for data management, manipulation, creation, analysis, and to perform repetitive workflows. You will have a deep understanding of capabilities of ArcPy and some knowledges of the nuances that can be encountered and how several tools can be used to achieve the same or similar output.
The ideal student for this course would have some basic knowledge of Python and is somewhat familiar with ArcGIS Pro. No knowledge of ArcPy is necessary, after all, that is what this course is for.
Want to stand out from the crowd? Well what are you waiting for?