From the course: Python Scripting Using the ArcGIS API for Python

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Understanding the properties returned as dictionaries

Understanding the properties returned as dictionaries

From the course: Python Scripting Using the ArcGIS API for Python

Understanding the properties returned as dictionaries

- [Instructor] There are a bunch of cases in the ArcGIS API where a set of properties for an object are returned as a Python dictionary. I want to walk through a few of these dictionaries and show you how to get to the actual property values, just so you can get the syntax right. So I'm going to open up the API reference. Suppose I want to print the geometry type of a feature layer, for example, so that I can grab hold of it and check it maybe in a conditional statement. If this feature layer is a polygon, let's go calculate its area, or if it's a point, let's do a buffer on it. So I need to check the geometry type. How do I do that? So let's look at the properties and methods for a feature layer class to see what we can get at. So we'll go down here to the feature layer object and expand its help. You can see all the different properties and methods, right? The methods are the ones with the parentheses after them. They perform an action and return of value. And these properties, some…

Contents