GEOG Flashcards
(18 cards)
What do you call the template that you use to create an object in computer programming?
class
After an object is created in a computer program, name 2 kinds of items that the object has that you can manipulate?
properties and methods
Why is the line below important in an ArcGIS Python script?
import arcpy
arcpy is required to use ArcGIS python functions
What object in arcpy saves selection information, a feature class or a feature layer?
feature layer
Which function would you use to create a feature class from a selection? Copy Rows? Copy Features?
copy features
Which function would you use to create a table from a selection? Copy Rows? Copy Features?
copy rows
You need to make a selection on a feature class for all the features that have a value of ‘38G9’ in its SOIL_TYPE field. Do you use a SelectLayerByAttribute or a SelectLayerByLocation to perform the selection?
select by attribute
You need to make a selection on a line feature class where its lines intersect the polygons of a second layer. Do you use a SelectLayerByAttribute or a SelectLayerByLocation to perform the selection?
select by location
Name 2 differences between a feature class and a feature layer
a feature class is a group of actual files/tables, a feature layer is the representation of a feature class in memory. A feature class remains in the computer even after a pro session ends, a feature layer ceases to exist when ArcGIS pro is closed. A feature class does not save selection information and a feature layer does.
Name 2 differences between a table and a table view.
Tables can be computer files, a table view is the representation of a table in computer memory. Tables are dbf, csv, excel files, a table view is created in the contents pane when a table is loaded. Table files remain in the computer after an ArcGIS session ends, table views cease to exist. Table views save selection information and tables do not.
The range function in Python creates a sequence of numbers. What numbers would the line below return, and in what order?
range(5)
0,1,2,3,4
Based on the code lines below,
aSeq = range(5)
for anItem in aSeq:
print (f”Starting process with element {anItem}…”)
how many times will the loop iterate?
5
aSeq = range(5)
for anItem in aSeq:
print (f”Starting process with element {anItem}…”)
what will be the value of anItem in the third iteration?
2
aSeq = range(5)
for anItem in aSeq:
print (f”Starting process with element {anItem}…”)
will the value of aSeq change as the loop is processing?
no
aList = [134, 8, ‘X’, ‘B’, 9, aLayer]
for x in aList:
print (f”Starting process with element {x}…”)
how many times will the loop iterate?
6
aList = [134, 8, ‘X’, ‘B’, 9, aLayer]
for x in aList:
print (f”Starting process with element {x}…”)
what will be the value of the variable x in the third iteration?
X
aList = [134, 8, ‘X’, ‘B’, 9, aLayer]
for x in aList:
print (f”Starting process with element {x}…”)
will the value of alist change as the loop is processing?
no