From the course: Learning ArcGIS Python Scripting
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Write a script using ArcGIS API - ArcGIS Pro Tutorial
From the course: Learning ArcGIS Python Scripting
Write a script using ArcGIS API
- [Instructor] Let's write some code to interact a little with a web map. In this example, we'll use a lot of the things we've learned so far, including accessing ArcGIS, API for Python objects and their properties, getting input from the user, and checking values with conditional statements. First, since I'm going to be working with web resources, I need to import the ArcGIS module. I'll also import getpass to help me get the password securely. We saw this earlier in the class. Now, I'll make a variable to hold my username, that just makes it easy to change later on. I'll also add a variable to hold my password, but I'm going to set that equal to getpass so the script will stop and ask me to type it in in a secure way. Now, I'll create the GIS object. You remember the way we do that, we set a object variable, I'm going to call it gis, set it equal to ArcGIS.gis.gis. It looks kind of funny, but that's just how it is. ArcGIS.gis.gis. So the ArcGIS library, the GIS module, and the GIS…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Working with lists6m 18s
-
(Locked)
List methods and functions8m 48s
-
(Locked)
Use loops to work with lists7m 50s
-
(Locked)
Write a script using list methods and a for-loop3m 39s
-
(Locked)
Nested loops8m 16s
-
(Locked)
Conditional statements7m 35s
-
(Locked)
Write a script using ArcGIS API10m 31s
-
(Locked)
Getting to the properties of GIS data with Describe3m 28s
-
(Locked)
Challenge: Properties of layers37s
-
(Locked)
Solution: Properties of layers3m 4s
-
(Locked)
-
-
-
-