Shared Flashcard Set

Details

ArcGIS 8138 Final Review
ArcGIS 8138 final review
55
Computer Science
Graduate
03/04/2012

Additional Computer Science Flashcards

 


 

Cards

Term
What are ways of getting error messages in arcpy
Definition
arcpy,AddMessage
arcpy.AddWarning
arcpy.AddError
Term
What are ways of error checking
Definition
Specific
Nonspecific
License checking
Term
What does GetMessage do?
arcpy.GetMessage(0)
Definition
gets messages
Term
What does GetMessage do?
arcpy.GetMessage(1)
Definition
gets warnings
Term
What does GetMessage do?
arcpy.GetMessage(2)
Definition
gets errors
Term
What does GetMessage do?
arcpy.GetMessage()
Definition
gets messages, warnings and errors
Term
What do these commands do?
arcpy.CheckExtension
Definition
checks if the license is available to be checked out
Term
What do these commands do?
arcpy.CheckOutExtension
Definition
retrieve and lock an extension from the license manager
Term
What do these commands do?
arcpy.CheckInExtention
Definition
returns a license to the license manager
Term
GetMessage(index)
Definition
Returns a string of all messages from the last geoprocessing tool executed
Term
GetMessage(severity)
Definition
Filters based on error severity
Term
GetMessage(0)
Definition
returns all messages
Term
GetMessage(1)
Definition
returns all warnings
Term
GetMessage(2)
Definition
returns all errors
Term
GetMessage()
Definition
returns all messages, warnings, and errors
Term
arcpy.CheckExtension()
Definition
to see if a license is available to be checked out
Term
arcpy.CheckOutExtension()
Definition
to retrieve, and lock, a license from the license manager
Term
arcpy.CheckInExtension()
Definition
to return a license to the license manager
Term
what is a value table
Definition
A flexible object that can be used as input for a multivalue parameter
Term
What are methods used for?
Definition
add/remove rows
get/set values
Term
what does: from arcpy.sa import*
Definition
spatial analyst
Term
What is a method?
Definition
A method is a function within a class
Term
How do you return a value for a function?
Definition
def test_value ( number ):
if number == 1 :
outputs = ' Value is 1 '
return outputs
else:
outputs = ' Value is not 1 '
return outputs
Term
How do you create an instance of a Class?
Definition
By assigning a variable name to it.
x = MyClass()
Term
What can you do with the arcpy.mapping module?
Definition
Allows you to open and manipulate ArcMap map documents (.mxd) and layer files (.lyr).
You can open map documents and layers; query and alter the contents; and print, export, or save a modified document.
manipulate maps, layouts, and layers through Python scripting
Term
How can you get a list of dataframes for selection?
Definition
dfList = arcpy.mapping.ListDataFrames(mxd)
dfList = arcpy.mapping.ListDataFrames(mxd, "*")
Term
Code example from exam review:
import arcpy
mxd = arcpy.mapping.MapDocument(“ïnput.mxd”)
df = arcpy.mapping.ListDataFrames(mxd)
df.scale = 24000
df.rotation = 2.7
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.name == “landuse”:
lyr.visible = True
lyr.showLabels = True
lyr.saveACopy(“output.lyr”)
mxd.save()
del mxd

What is the name of the mxd?
Definition
input.mxd
Term
Code example from exam review:
import arcpy
mxd = arcpy.mapping.MapDocument(“ïnput.mxd”)
df = arcpy.mapping.ListDataFrames(mxd)
df.scale = 24000
df.rotation = 2.7
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.name == “landuse”:
lyr.visible = True
lyr.showLabels = True
lyr.saveACopy(“output.lyr”)
mxd.save()
del mxd

what does the for loop do?
Definition
iterates through a list. “Checks for layer called landuse then turns on labels and visibility then saves a copy to output.lyr”
Term
What does del do
Definition
Releases memory stoarge of .mxd
Term
When can you use “CURRENT” in arcpy.mapping?
Definition
“when you are working with ArcMap session only”
Term
When you update some Map Frame parameters in arcpy, will the changes appear automatically?
Definition
“No, you need to update/refresh the screen:
arcpy.RefreshActiveView()
arcpy.RefreshContents()
Term
With respect to dataframes What is the purpose of [0]?
Definition
to get the first list element from the list generated by ListDataFrames:
df = arcpy.mapping.ListDataFrames(MXD)[0]
Term
What is def __init__ ?
Definition
-always the first function / method
-is a constructor, it runs to create an instance of a class
Term
What is a widget in Tkinter?
Definition
The generic term for any of the building blocks that make up a GUI application.
These include things like windows, buttons, menus, menu items, drop-down lists, scroll bars
Term
What is an event handler in Tkinter?
Definition
Routine that does the work of the GUI... or a callback routine that handles input received in a script - code executed when an event occurs - binding associates this event handler with a widget. events include: etc.
Term
What is the purpose of packing?
Definition
To orientate button placement. The default is to "pack" buttons (widgets) one above the other Packing options are LEFT, RIGHT, TOP, and BOTTOM

To orientate button placement. The default is to "pack" buttons (widgets) one above the other Packing options are LEFT, RIGHT, TOP, and BOTTOm
To orientate button placement. The default is to "pack" buttons (widgets) one above the other Packing options are LEFT, RIGHT, TOP, and BOTTOM
Also, to tell tTkinter that we want to display the widget onscreen
Term
What is a button
Definition
a widget, a variable name that references to an instace or a tkinter Button Class
Term
What is Button
Definition
A Tkinter class used to create button widgets.
Term
How do you define a global variable
Definition
use the folling syntax:
global variable_name
Term
What is a listbox?
Definition
This is a widget is a standard Tkinter widget used to display a list. can only contain text items, and all items must have the same font and colour.
Term
What are some parameters of a listbox? SINGLE
Definition
(just a single choice. Default mode.)
Term
What are some parameters of a listbox? BROWSE
Definition
(same as SINGLE, but the selection can be moved using the mouse)
Term
What are some parameters of a listbox? MULTIPLE
Definition
(multiple items can be chosen, by clicking on them one at a time)
Term
What are some parameters of a listbox? EXTENDED
Definition
(multiple ranges of items can be chosen, using the Shift + Control keys)
Term
How does a scrollbar work?
Definition
When the widget view is modified, the widget notifies the scrollbar by calling the set method. And when the user manipulates the scrollbar, the widget’s yview method is called with the appropriate arguments
Term
What is an Entry widget?
Definition
Used to enter text strings
User can only enter one line of text, to enter multiple lines you would have to use the Text widget
Term
How do you apply symbology to a feature class?
Definition
ApplySymbologyFromLayer_management (in_layer, in_symbology_layer)
Term
What makes a good UI?
Definition
Simple, Intuitive, respects common conventions, visually organized, native look

SIRCCVON
Term
What is the grid method?
Definition
Treats a frame as a table
Term
What are some grid parameters?
Definition
column, columnspan, ipadx, ipady, padx, pady, row, rowspan, sticky
Term
What are sticky parameters?
Definition
Cardinal Directions (i.e. N, S, E, W, NE, etc)
Term
How do sticky parameters work?
Definition
Can combine directions
i.e. N + S → stretches widget out vertically across the cell
i.e. E + W → stretches widget out horizontally across the cell
Term
How do you assign a title to a Tkinter menu?
Definition
define your title in your local variables:


then below where you make an instance of your root:
Term
What kind of layout elements can you select?
Definition
GraphicElement: groups of elements, inserted tables, graphs
LegendElement:
MapsurroundElement: North Arrow, scale text, and scale bar
TextElement: inserted text, callouts, rectangle text, titles etc
PictureElement: a raster or image that has been inserted into a page layout (logo)
Term
What kind of changes can you apply to layout elements?
Definition
- change elem position X/Y (note units are set as inches... so divide by 2.54 for cm)
- can change string values of text elements
- can add or remove items in the legend (partially through layer management)
Supporting users have an ad free experience!