GEOM 73 - Python Quiz 1

Beschreibung

Geography Quiz am GEOM 73 - Python Quiz 1, erstellt von Maggie Samson am 13/04/2019.
Maggie Samson
Quiz von Maggie Samson, aktualisiert more than 1 year ago
Maggie Samson
Erstellt von Maggie Samson vor mehr als 5 Jahre
111
2

Zusammenfassung der Ressource

Frage 1

Frage
What is the difference between a site package (like ArcPy) and a module in Python?
Antworten
  • A site package needs to be imported into a script
  • A site package is created by a 3rd party
  • A site package is installed by default as part of the regular Python installation
  • A site package contains multiple modules, as well as classes and functions

Frage 2

Frage
Which of the following represents older Python scripts written before ArcPy was introduced in version 10 of ArcGIS Desktop? (check all that apply)
Antworten
  • import geoprocessing gp = geoprocessing.create()
  • import ArcGISscripting gp = ArcGISscripting.create()
  • import arcgispython gp = arcgispython.client(9.3)
  • import win32com.client gp = win32com.client.Dispach("...")

Frage 3

Frage
Consider the following code import arcpy arcpy.env.workspace = "C:/Data" In the second line of code, workspace is a __ of the env __.
Antworten
  • parameter, function
  • parameter, class
  • function, module
  • function, class
  • property, module
  • object, class
  • property, class

Frage 4

Frage
Which of the following are typical properties of geoprocessing tool parameters? (select all that apply)
Antworten
  • Direction (input or output)
  • Environment settings (e.g. coordinate system, workspace)
  • Data type (e.g. feature class, raster, string)
  • Required or optional
  • Name
  • Unit (e.g. m, km, degrees)

Frage 5

Frage
Which of the following is not a way to skip optional parameters when running a geoprocessing tool in ArcPy?
Antworten
  • Create a list of parameters and resorting the list in the geoprocessing tool.
  • Bypassing optional parameters by specifying the parameter of interest by name.
  • Setting optional parameters to an empty string ("").
  • Setting optional parameters to the number sign (#).

Frage 6

Frage
Which of the following is(are) correct to run the clip tool? (check all that apply)
Antworten
  • import arcpy arcpy.env.workspace("C:/data") arcpy.analysis_Clip("roads.shp", "boundary.shp", "result.shp")
  • import arcpy arcpy.env.workspace("c:/data") arcpy.analysis.Clip("roads.shp", "boundary.shp", "result.shp")
  • import arcpy arcpy.env.workspace("c:/data") arcpy.Clip.analysis("roads.shp", "boundary.shp", "result.shp")
  • import arcpy arcpy.env.workspace("c:/data") arcpy.Clip_analysis("roads.shp", "boundary.shp", "result.shp")

Frage 7

Frage
All functions in ArcPy are tools in ArcToolbox
Antworten
  • True
  • False

Frage 8

Frage
Which of the following correctly describes the general syntax for a function in ArcPy?
Antworten
  • arcpy.<functionname>.<arguments>
  • arcpy_<functionname>_<arguments>
  • arcpy.<functionname>(<argumnets>)
  • arcpy.<functionname>_<arguments>
  • arcpy_<functionname>(<arguments>)

Frage 9

Frage
Consider the following code: import arcpy myprj = "c:/data/example.prj" spatialref = arcpy.SpatialReference(myprj) In the last line of code, myprj is a __ of the SpatialReference __.
Antworten
  • function, module
  • function, class
  • property, class
  • property, module
  • parameter, class
  • parameter, function

Frage 10

Frage
Which of the following is used to retrieve all error messages from executing a geoprocessing tool?
Antworten
  • print arcpy.GetMessages()
  • print arcpy.GetMessage(2)
  • print arcpy.GetMessage()
  • print arcpy.GetMessages(2)
  • print arcpy.GetMessages(1)
  • print arcpy.GetMessage(1)
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Geography Coastal Zones Flashcards
Zakiya Tabassum
Geography Quiz
PatrickNoonan
Using GoConqr to study geography
Sarah Egan
All the Countries of the World and their Capital Cities
PatrickNoonan
Tectonic Hazards flashcards
katiehumphrey
Volcanoes
1jdjdjd1
River Processes and Landforms
1jdjdjd1
GCSE Geography - Causes of Climate Change
Beth Coiley
The Rock Cycle
eimearkelly3
Plate Tectonics
eimearkelly3
Characteristics and Climate of a hot desert
Adam Collinge